3

Starting by hypothesys that I have already defined and installed a package with and entrypoint that looks like:

setup(...
    entry_points={
        'group.subgrp': []
    }
...)

Then during runtime I would love to define some functions and attach them as entrypoints. The pseudo-code could looks like:

@Entrypoint.attach(group='group.subgrp', name='dummy_name')
def my_dummy_function():
    ....

Is that doable?

EDIT: After write the question, I have came to conclusion that this makes no sense, since the callable defined on entrypoints are 'accessible' even if the package isn't being "ran". Anyway I will leave the question here, just to hear from community.

Lin
  • 1,145
  • 11
  • 28
  • Very much related https://stackoverflow.com/q/40514205/11715259, almost a duplicate? Yet the here present question is much more focused, better quality, IMHO, and including the thought that this would be an anti-pattern. – N1ngu Aug 25 '22 at 15:05

0 Answers0