search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``igraph`.`Configuration``

class documentation

`class Configuration: (source)`

Constructor: `Configuration(filename)`

View In Hierarchy

Class representing igraph configuration details.

Note that there is one primary instance of this class, which is used by igraph itself to retrieve configuration parameters when needed. You can access this instance with the `instance()` method. You may construct other instances by invoking the constructor directly, but these instances will not affect igraph's behaviour. If you are interested in configuring igraph, use `igraph.config` to get hold of the singleton instance and then modify it.

## General ideas

The configuration of igraph is stored in the form of name-value pairs. This object provides an interface to the configuration data using the syntax known from dict:

    >>> c = Configuration()
    >>> c["general.verbose"] = True
    >>> print(c["general.verbose"])
    True

Configuration keys are organized into sections, and the name to be used for a given key is always in the form `section.keyname`, like `general.verbose` in the example above. In that case, `general` is the name of the configuration section, and `verbose` is the name of the key. If the name of the section is omitted, it defaults to `general`, so `general.verbose` can be referred to as `verbose`:

    >>> c = Configuration()
    >>> c["verbose"] = True
    >>> print(c["general.verbose"])
    True

User-level configuration is stored in `~/.igraphrc` per default on Linux and Mac OS X systems, or in `C:\Documents and Settings\username\.igraphrc` on Windows systems. However, this configuration is read only when `igraph` is launched through its shell interface defined in `igraph.app.shell`. This behaviour might change before version 1.0.

## Known configuration keys

The known configuration keys are presented below, sorted by section. When referring to them in program code, don't forget to add the section name, expect in the case of section `general`.

### General settings

These settings are all stored in section `general`.

- shells: the list of preferred Python shells to be used with the command-line `igraph` script. The shells in the list are tried one by one until any of them is found on the system. `igraph` functions are then imported into the main namespace of the shell and the shell is launched. Known shells and their respective class names to be used can be found in `igraph.app.shell`. Example: `IPythonShell, ClassicPythonShell`. This is the default, by the way.
- verbose: whether `igraph` should talk more than really necessary. For instance, if set to `True`, some functions display progress bars.

### Plotting settings

These settings specify the default values used by plotting functions. They are all stored in section `plotting`.

- backend: either "cairo" if you want to use Cairo for plotting or "matplotlib" if you want to use the Matplotlib plotting backend.
- layout: default graph layout algorithm to be used.
- mark_groups: whether to mark the clusters by polygons when plotting a clustering object.
- palette: default palette to be used for converting integer numbers to colors. See `colors.Palette` for more information. Valid palette names are stored in `colors.palettes`.
- wrap_labels: whether to try to wrap the labels of the vertices automatically if they don't fit within the vertex. Default: `False`.

### Shell settings

These settings specify options for external environments in which igraph is embedded (e.g., IPython and its Qt console). These settings are stored in section `shell`.

- ipython.inlining.Plot: whether to show instances of the `Plot` class inline in IPython's console if the console supports it. Default: `True`

Class | `Types` | Static class for the implementation of custom getter/setter functions for configuration keys
Class Method | `instance` | Returns the single instance of the configuration object.
Method | `__contains__` | Checks whether the given configuration item is set.
Method | `__delitem__` | Deletes the given item from the configuration.
Method | `__getitem__` | Returns the given configuration item.
Method | `__init__` | Creates a new configuration instance.
Method | `__setitem__` | Sets the given configuration item.
Method | `has_key` | Checks if the configuration has a given key.
Method | `load` | Loads the configuration from the given file.
Method | `save` | Saves the configuration.
Property | `filename` | Returns the filename associated to the object.
Static Method | `_item_to_section_key` | Converts an item description to a section-key pair.
Method | `_get` | Internal function that returns the value of a given key in a given section.
Class Variable | `_definitions` | Undocumented
Class Variable | `_instance` | Undocumented
Class Variable | `_sections` | Undocumented
Class Variable | `_types` | Undocumented
Instance Variable | `_config` | Undocumented
Instance Variable | `_filename` | Name of the file that the configuration was loaded from, or ``None`` if not known.

@classmethod
def instance(cls): (source)

Returns the single instance of the configuration object.

def __contains__(self, item: `str`) -> `bool`: (source)

Checks whether the given configuration item is set.

Parameters
item:`str` | the configuration key to check.
Returns
`bool` | `True` if the key has an associated value, `False` otherwise.

def __delitem__(self, item: `str`): (source)

Deletes the given item from the configuration.

If the item has a default value, the default value is written back instead of the current value. Without a default value, the item is really deleted.

def __getitem__(self, item: `str`): (source)

Returns the given configuration item.

Parameters
item:`str` | the configuration key to retrieve.
Returns
the configuration value

def __init__(self, filename=None): (source)

Creates a new configuration instance.

Parameters
filename | file or file-like object to be read. Can be omitted.

def __setitem__(self, item: `str`, value): (source)

Sets the given configuration item.

Parameters
item:`str` | the configuration key to set
value | the new value of the configuration key

def has_key(self, item: `str`) -> `bool`: (source)

Checks if the configuration has a given key.

Parameters
item:`str` | the key being sought
Returns
`bool` | Undocumented

def load(self, stream=None): (source)

Loads the configuration from the given file.

Parameters
stream | name of a file or a file object. The configuration will be loaded from here. Can be omitted, in this case, the user-level configuration is loaded.

def save(self, stream: `str | IO[str] | None` = None): (source)

Saves the configuration.

Parameters
stream:`str | IO[str] | None` | name of a file or a file-like object. The configuration will be saved there. Can be omitted, in this case, the user-level configuration file will be overwritten.

@property
filename: `str | None` = (source)

Returns the filename associated to the object.

It is usually the name of the configuration file that was used when creating the object. `Configuration.load` always overwrites it with the filename given to it. If `None`, the configuration was either created from scratch or it was updated from a stream without name information.

@staticmethod
def _item_to_section_key(item: `str`) -> `tuple[str, str]`: (source)

Converts an item description to a section-key pair.

Parameters
item:`str` | the item to be converted
Returns
`tuple[str, str]` | if `item` contains a period (`.`), it is split into two parts at the first period, then the two parts are returned, so the part before the period is the section. If `item` does not contain a period, the section is assumed to be `general`, and the second part of the returned pair contains `item` unchanged

def _get(self, section: `str`, key: `str`): (source)

Internal function that returns the value of a given key in a given section.

_definitions: `dict` = (source)

Undocumented

_instance = (source)

Undocumented

_sections: `Sequence[str]` = (source)

Undocumented

_types = (source)

Undocumented

_config = (source)

Undocumented

_filename: `str | None` = (source)

Name of the file that the configuration was loaded from, or ``None`` if not known.