QamoosTech
DevOps & CloudEnvironments and packagingIntermediatePython

Entry Point

PronunciationEN-tree poynt

Definition

An entry point is where a program starts. In packaging, a console-script entry point makes installing a package create a command that calls a function you chose.

Where you hear it

In pyproject.toml under [project.scripts], in CLI tutorials, and in framework docs about where execution begins.

Examples

  • Declare tracker = "tracker.cli:main" as the entry point.
  • After installing, the tracker command exists thanks to the entry point.
  • The entry point main() parses the arguments and starts the app.

Common mistake

Pointing it at a module-level script that runs on import. Point it at a function that does its work only when called.

Don't confuse with

A CLI, which is the kind of program an entry point often starts. The entry point is the hook that links the command to the code.

Say it at work

  • In a meeting or chatWhat's the entry point of this service?
  • In an email or ticketRename the function and update the entry point.