entrypoint2

1.1 · active · verified Wed Apr 15

Entrypoint2 is an easy-to-use command-line interface for Python modules. It translates function signatures and documentation directly into `argparse` configurations, simplifying CLI creation. The current version is 1.1. Releases appear to be infrequent and event-driven, rather than on a fixed cadence.

Warnings

Install

Imports

Quickstart

Define a function and decorate it with `@entrypoint`. The function's arguments become command-line parameters. You can then run the module as a script.

from entrypoint2 import entrypoint

@entrypoint
def hello(message):
    print(f"Hello, {message}!")

# To run from command line:
# python -m your_module_name hello World
# python -m your_module_name hello --help

view raw JSON →