Skip to main content

Discover and load entry points from installed packages.

Project description

This package is in maintenance-only mode. New code should use the importlib.metadata module in the Python standard library to find and load entry points.

Entry points are a way for Python packages to advertise objects with some common interface. The most common examples are console_scripts entry points, which define shell commands by identifying a Python function to run.

Groups of entry points, such as console_scripts, point to objects with similar interfaces. An application might use a group to find its plugins, or multiple groups if it has different kinds of plugins.

The entrypoints module contains functions to find and load entry points. You can install it from PyPI with pip install entrypoints.

To advertise entry points when distributing a package, see entry_points in the Python Packaging User Guide.

The pkg_resources module distributed with setuptools provides a way to discover entrypoints as well, but it contains other functionality unrelated to entrypoint discovery, and it does a lot of work at import time. Merely importing pkg_resources causes it to scan the files of all installed packages. Thus, in environments where a large number of packages are installed, importing pkg_resources can be very slow (several seconds).

By contrast, entrypoints is focused solely on entrypoint discovery and it is faster. Importing entrypoints does not scan anything, and getting a given entrypoint group performs a more focused scan.

When there are multiple versions of the same distribution in different directories on sys.path, entrypoints follows the rule that the first one wins. In most cases, this follows the logic of imports. Similarly, Entrypoints relies on pip to ensure that only one .dist-info or .egg-info directory exists for each installed package. There is no reliable way to pick which of several .dist-info folders accurately relates to the importable modules.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

entrypoints-0.4.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

entrypoints-0.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file entrypoints-0.4.tar.gz.

File metadata

  • Download URL: entrypoints-0.4.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.0

File hashes

Hashes for entrypoints-0.4.tar.gz
Algorithm Hash digest
SHA256 b706eddaa9218a19ebcd67b56818f05bb27589b1ca9e8d797b74affad4ccacd4
MD5 3acd8b72119a8fb1eac7030c24ac6b49
BLAKE2b-256 ea8da7121ffe5f402dc015277d2d31eb82d2187334503a011c18f2e78ecbb9b2

See more details on using hashes here.

File details

Details for the file entrypoints-0.4-py3-none-any.whl.

File metadata

  • Download URL: entrypoints-0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.0

File hashes

Hashes for entrypoints-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f174b5ff827504fd3cd97cc3f8649f3693f51538c7e4bdf3ef002c8429d42f9f
MD5 1c8f717951f0d2f0125739753eda6bdc
BLAKE2b-256 35a8365059bbcd4572cbc41de17fd5b682be5868b218c3c5479071865cab9078

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page