# eric7.PipInterface.piplicenses

pip-licenses

MIT License

Copyright (c) 2018 raimon

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.

### Global Attributes

DEFAULT_OUTPUT_FIELDS
FIELDS_TO_METADATA_KEYS
FIELD_NAMES
LICENSE_UNKNOWN
MAP_DEST_TO_ENUM
METADATA_KEYS
SUMMARY_OUTPUT_FIELDS
SYSTEM_PACKAGES
__author__
__license__
__pkgname__
__summary__
__url__
__version__

### Classes

CompatibleArgumentParser |
CustomHelpFormatter |
CustomNamespace |
FromArg |
NoValueEnum |
OrderArg |
SelectAction |

### Functions

choices_from_enum |
create_licenses_list |
create_output_string |
create_parser |
create_summary_list |
enum_key_to_value |
find_license_from_classifier |
get_installed_distributions |
get_output_fields |
get_packages |
get_pkg_included_file | Attempt to find the package's included file on disk and return the tuple (included_file_path, included_file_contents).
get_pkg_info |
main |
select_license_by_source |
value_to_enum_key |

## CompatibleArgumentParser

### Derived from

argparse.ArgumentParser

### Class Attributes

None

### Class Methods

None

### Methods

_verify_args |
parse_args |

### Static Methods

None

#### CompatibleArgumentParser._verify_args

_verify_args(args: CustomNamespace)

#### CompatibleArgumentParser.parse_args

parse_args(args: Optional[Sequence[Text]] = None, namespace: CustomNamespace = None)
Up

## CustomHelpFormatter

### Derived from

argparse.HelpFormatter

### Class Attributes

None

### Class Methods

None

### Methods

CustomHelpFormatter |
_expand_help |
_format_action |
_split_lines |

### Static Methods

None

#### CustomHelpFormatter (Constructor)

CustomHelpFormatter(prog: Text, indent_increment: int = 2, max_help_position: int = 24, width: Optional[int] = None)

#### CustomHelpFormatter._expand_help

_expand_help(action: argparse.Action)

#### CustomHelpFormatter._format_action

_format_action(action: argparse.Action)

#### CustomHelpFormatter._split_lines

_split_lines(text: Text, width: int)
Up

## CustomNamespace

### Derived from

argparse.Namespace

### Class Attributes

None

### Class Methods

None

### Methods

None

### Static Methods

None

Up

## FromArg

### Derived from

NoValueEnum

### Class Attributes

ALL
CLASSIFIER
META
MIXED

### Class Methods

None

### Methods

None

### Static Methods

None

Up

## NoValueEnum

### Derived from

Enum

### Class Attributes

None

### Class Methods

None

### Methods

__repr__ |

### Static Methods

None

#### NoValueEnum.__repr__

__repr__()
Up

## OrderArg

### Derived from

NoValueEnum

### Class Attributes

AUTHOR
COUNT
LICENSE
NAME
URL

### Class Methods

None

### Methods

None

### Static Methods

None

Up

## SelectAction

### Derived from

argparse.Action

### Class Attributes

None

### Class Methods

None

### Methods

__call__ |

### Static Methods

None

#### SelectAction.__call__

__call__(parser: argparse.ArgumentParser, namespace: argparse.Namespace, values: Text, option_string: Optional[Text] = None, )
Up

## choices_from_enum

choices_from_enum(enum_cls: NoValueEnum)
Up

## create_licenses_list

create_licenses_list(args: "CustomNamespace", output_fields=DEFAULT_OUTPUT_FIELDS)
Up

## create_output_string

create_output_string(args: "CustomNamespace")
Up

## create_parser

create_parser()
Up

## create_summary_list

create_summary_list(args: "CustomNamespace")
Up

## enum_key_to_value

enum_key_to_value(enum_key: Enum)
Up

## find_license_from_classifier

find_license_from_classifier(message)
Up

## get_installed_distributions

get_installed_distributions(local_only=True, user_only=False)
Up

## get_output_fields

get_output_fields(args: "CustomNamespace")
Up

## get_packages

get_packages(args: "CustomNamespace")
Up

## get_pkg_included_file

get_pkg_included_file(pkg, file_names)

Attempt to find the package's included file on disk and return the tuple (included_file_path, included_file_contents).

Up

## get_pkg_info

get_pkg_info(pkg)
Up

## main

main()
Up

## select_license_by_source

select_license_by_source(from_source, license_classifier, license_meta)
Up

## value_to_enum_key

value_to_enum_key(value: str)
Up