class EntryPoint(DeprecatedTuple): (source)
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']
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setattr__ |
Undocumented |
Method | load |
Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. |
Method | matches |
EntryPoint matches the given parameters. |
Class Variable | dist |
Undocumented |
Class Variable | group |
Undocumented |
Class Variable | name |
Undocumented |
Class Variable | pattern |
A regular expression describing the syntax for an entry point, which might look like: |
Class Variable | value |
Undocumented |
Property | attr |
Undocumented |
Property | extras |
Undocumented |
Property | module |
Undocumented |
Method | _for |
Undocumented |
Method | _key |
Undocumented |
Inherited from DeprecatedTuple
:
Method | __getitem__ |
Undocumented |
Class Variable | _warn |
Undocumented |
Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object.
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
A regular expression describing the syntax for an entry point, which might look like: - module - package.module - package.module:attribute - package.module:object.attribute - package.module:attr [extra1, extra2] Other combinations are possible as well. The expression is lenient about whitespace around the ':', following the attr, and following any extras.