Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
pip._internal.configuration.Configuration Class Reference

Public Member Functions

None __init__ (self, bool isolated, Optional[Kind] load_only=None)
 
None load (self)
 
Optional[str] get_file_to_edit (self)
 
Iterable[Tuple[str, Any]] items (self)
 
Any get_value (self, str key)
 
None set_value (self, str key, Any value)
 
None unset_value (self, str key)
 
None save (self)
 
Iterable[Tuple[str, str]] get_environ_vars (self)
 
Iterable[Tuple[Kind, List[str]]] iter_config_files (self)
 
Dict[str, Any] get_values_in_config (self, Kind variant)
 
str __repr__ (self)
 

Public Attributes

 isolated
 
 load_only
 

Protected Member Functions

None _ensure_have_load_only (self)
 
Dict[str, Any] _dictionary (self)
 
None _load_config_files (self)
 
RawConfigParser _load_file (self, Kind variant, str fname)
 
RawConfigParser _construct_parser (self, str fname)
 
None _load_environment_vars (self)
 
Dict[str, Any] _normalized_keys (self, str section, Iterable[Tuple[str, Any]] items)
 
Tuple[str, RawConfigParser] _get_parser_to_modify (self)
 
None _mark_as_modified (self, str fname, RawConfigParser parser)
 

Detailed Description

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.

Member Function Documentation

◆ _dictionary()

Dict[str, Any] pip._internal.configuration.Configuration._dictionary (   self)
protected
A dictionary representing the loaded configuration.

◆ _load_config_files()

None pip._internal.configuration.Configuration._load_config_files (   self)
protected
Loads configuration from configuration files

◆ _load_environment_vars()

None pip._internal.configuration.Configuration._load_environment_vars (   self)
protected
Loads configuration from environment variables

◆ _normalized_keys()

Dict[str, Any] pip._internal.configuration.Configuration._normalized_keys (   self,
str  section,
Iterable[Tuple[str, Any]]   items 
)
protected
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()

Iterable[Tuple[str, str]] pip._internal.configuration.Configuration.get_environ_vars (   self)
Returns a generator with all environmental vars with prefix PIP_

◆ get_file_to_edit()

Optional[str] pip._internal.configuration.Configuration.get_file_to_edit (   self)
Returns the file with highest priority in configuration

◆ get_value()

Any pip._internal.configuration.Configuration.get_value (   self,
str  key 
)
Get a value from the configuration.

◆ get_values_in_config()

Dict[str, Any] pip._internal.configuration.Configuration.get_values_in_config (   self,
Kind  variant 
)
Get values present in a config file

◆ items()

Iterable[Tuple[str, Any]] pip._internal.configuration.Configuration.items (   self)
Returns key-value pairs like dict.items() representing the loaded
configuration

◆ iter_config_files()

Iterable[Tuple[Kind, List[str]]] pip._internal.configuration.Configuration.iter_config_files (   self)
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

◆ load()

None pip._internal.configuration.Configuration.load (   self)
Loads configuration from configuration files and environment

◆ save()

None pip._internal.configuration.Configuration.save (   self)
Save the current in-memory state.

◆ set_value()

None pip._internal.configuration.Configuration.set_value (   self,
str  key,
Any  value 
)
Modify a value in the configuration.

◆ unset_value()

None pip._internal.configuration.Configuration.unset_value (   self,
str  key 
)
Unset a value in the configuration.

The documentation for this class was generated from the following file: