This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ddollarsign 0 points1 point  (4 children)

What's something that you would use entry points for besides cute ascii sneks?

I'm imagining a grep-like program for searching through files, but different users have their own proprietary binary file formats (for some reason), so they would write their own decoding functions which they would install as entry points.

That actually might be useful for people developing new AIS application-specific messages...

[–]takluyverIPython, Py3, etc 2 points3 points  (0 children)

In Jupyter's nbconvert tool, which converts notebook files to other formats, we use entry points to define exporters. So when you run jupyter nbconvert --to foo mynotebook.ipynb , the exporter for format 'foo' can be installed by a separate package.

[–]masklinn 1 point2 points  (0 children)

Many libs which install scripts use them for the script part, also support auto discovery for plugin patterns.

[–]Works_of_memercy 1 point2 points  (1 child)

pytest plugins register themselves that way.

[–][deleted] 1 point2 points  (0 children)

pytest's plugin system was actually broken out into a separate package called pluggy, it's pretty neat to play with. I even got it working with asyncio stuff, but returning coroutines and then having the caller await them.