GithubHelp home page GithubHelp logo

graingert / entrypoints Goto Github PK

View Code? Open in Web Editor NEW

This project forked from takluyver/entrypoints

0.0 2.0 0.0 66 KB

Discover and load entry points from installed packages

Home Page: https://entrypoints.readthedocs.io/

License: MIT License

Python 100.00%

entrypoints's Introduction

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.

entrypoints's People

Contributors

takluyver avatar jwilk avatar janfreyberg avatar danielballan avatar hugovk avatar jdufresne avatar adamchainz avatar lowell80 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.