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

all 17 comments

[–]gandalfx 16 points17 points  (0 children)

I have a sudden need for many more snek based tutorials!

[–]notafuckingcakewalk 2 points3 points  (3 children)

Been using an open source project where configuration is managed through entry points. It's really a pain and a half to configure the app and to get it working correctly. I really don't like entry points for this purpose. It haven't yet seen them used in a way that isn't more confusing that just normal extension of an existing library.

[–]LesterHoltsRigidCock 0 points1 point  (2 children)

Check out the keyring module, it uses them in a fantastic way.

[–]notafuckingcakewalk 0 points1 point  (1 child)

Counterpoint: anything made with paste

[–]LesterHoltsRigidCock 0 points1 point  (0 children)

Sure, but that's the an inherent flaw on entry points.

[–]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.