File: api.rst

package info (click to toggle)
entrypoints 0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 168 kB
  • sloc: python: 301; makefile: 160; sh: 8
file content (65 lines) | stat: -rw-r--r-- 1,282 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
entrypoints API
===============

.. module:: entrypoints

High-level API
--------------

.. autofunction:: get_single

.. autofunction:: get_group_named

.. autofunction:: get_group_all

These functions will all use ``sys.path`` by default if you don't specify the
*path* parameter. This is normally what you want, so you shouldn't need to
pass *path*.

EntryPoint objects
------------------

.. autoclass:: EntryPoint

   .. attribute:: name

      The name identifying this entry point

   .. attribute:: module_name

      The name of an importable module to which it refers

   .. attribute:: object_name

      The dotted object name within the module, or *None* if the entry point
      refers to a module itself.

   .. attribute:: extras

      Extra setuptools features related to this entry point as a list, or *None*

   .. attribute:: distro

      The distribution which advertised this entry point -
      a :class:`Distribution` instance or None

   .. automethod:: load

   .. automethod:: from_string

.. autoclass:: Distribution

   .. attribute:: name

      The name of this distribution

   .. attribute:: version

      The version of this distribution, as a string

Exceptions
----------

.. autoexception:: BadEntryPoint

.. autoexception:: NoSuchEntryPoint