Are there conventions around naming entry point groups in Python?

29 views Asked by At

Pytest uses the pytest11 entry point group to automatically discover plugins once they are installed, without the need of any manual configuration by the user.

You can see them via

import pkg_resources

entry_point_group = 'pytest11'

print(f"Plugins in {entry_point_group} entry point group:")
for entry_point in pkg_resources.iter_entry_points(group=entry_point_group):
    print(entry_point.name)

I'm curious why pytest uses pytest11 and not just pytest. Is there a convention about which entry point group a project uses?

edit: pygments uses the same mechanism, but doesn't have this weird "11" in the name. I guess it's something pytest-specific.

0

There are 0 answers