#Adding a plugin/addon

9 messages · Page 1 of 1 (latest)

rare summit
#

Hey,
I was wondering if theres any good ways of adding an addon/plugin type system so I can extend my project. Im wondering if django packages (that goes in installed apps) would work fine, or would it need more than that.

So plugins would allow mainly integrations between my service and other made services. One of which is also a django project by me. Pretty much would allow that service to talk to the main Django project, but the plugin would handle the logic for calling the main projects functions rather than an API on the main project.

Plugins should be easily added, maybe a git clone into a /plugins/ and then add to installed apps and add a config section (almost like another settings file).

The logic wont need things like middleware, but will need to accept traffic (have its own views) and possibly its own authentication maybe like DRF tokens or something similar.

Thanks, I’d appreciate technical info or even just text concepts of how this could work.

Thanks again :)

storm steppe
#

Sounds like a django app to me. Have you considered going that route?

rare summit
#

No not yet, though sounds like the easiest options. I suppose i could still have a plugin folder where users clone an app into and then just reference plugins.pluginname in the installed apps.

Thanks, ill give that a read and attempt a system when I get home, appreciate it!

storm steppe
#

You'd pip install your package (there are private python library repo services out there) and add it into your installed apps

#

It wouldn't involve git as much.

rare summit
#

Oh amazing. I was thinking cause the plugins would only be applicable to my project i thought it’d make sense to have official plugins under github and users can make their own private if needed.
I suppose pip works the same way, cheers!

Ill edit this message once I add this with a description how I added it for future use if people come across this. Ill post any questions if i get stuck :)

woeful lion
rare summit
#

Thanks! Ill take a look at both options and see which one fits better