PyDocs

Nav

Importing Modules

EntryPoint

  • EntryPoint(name: 'str', value: 'str', group: 'str') -> 'None'
An entry point as defined by Python packaging conventions.

See `the packaging docs on entry points
<https://packaging.python.org/specifications/entry-points/>`_
for more information.

>>> ep = EntryPoint(
...     name=None, group=None, value='package.module:attr [extra1, extra2]')
>>> ep.module
'package.module'
>>> ep.attr
'attr'
>>> ep.extras
['extra1', 'extra2']

If the value package or module are not valid identifiers, a
ValueError is raised on access.

>>> EntryPoint(name=None, group=None, value='invalid-name').module
Traceback (most recent call last):
...
ValueError: ('Invalid object reference...invalid-name...
>>> EntryPoint(name=None, group=None, value='invalid-name').attr
Traceback (most recent call last):
...
ValueError: ('Invalid object reference...invalid-name...
>>> EntryPoint(name=None, group=None, value='invalid-name').extras
Traceback (most recent call last):
...
ValueError: ('Invalid object reference...invalid-name...

The same thing happens on construction.

>>> EntryPoint(name=None, group=None, value='invalid-name')
Traceback (most recent call last):
...
ValueError: ('Invalid object reference...invalid-name...
0 Examples
No examples for importlib.metadata/EntryPoint.
See Also
No see-alsos for importlib.metadata/EntryPoint
0 Notes
No notes for EntryPoint