Choosing an InsightConnect Plugin SDK

Considering building a plugin for InsightConnect? Great! Before you start, you should consider what SDK you would like to use to build your plugin. While each SDK will accomplish the same goal of completing a running plugin, the development experience as well as the final size of the plugin will differ.

The following plugin SDKs are available:

  • komand/python-2-27-slim-plugin
  • komand/python-3-37-slim-plugin
  • komand/python-3-37-plugin

Disclaimer: Python 2 has reached its end of life and should not be used unless absolutely necessary.

At the top of the list we have two slim SDKs. These SDKs are based off of Alpine Linux and are favored due to their tiny size once built. A basic InsightConnect plugin without many dependencies built on one of these SDKs will come out to be roughly ~120MB in size.

At the bottom of the list is a basic Python 3 SDK. This SDK is built off of Debian Linux and comes out to around ~180MB in total size.

Okay, so 120MB for the Alpine-based SDK is pretty tiny, why wouldn’t everyone want to use that? It comes down to dependencies. While most InsightConnect plugins can be built in a fairly barebones manner without requiring many (if any) dependencies, occasionally you will require the assistance of some third-party code to accomplish your goals… take for example the popular date & time library, maya (does anyone really want to work with the provided datetime module in Python? Yuck!)

maya is a fairly dependency-heavy Python module and because of this its use in an InsightConnect plugin can have a differing development experience depending on the chosen SDK. If the komand/python-3-37-plugin SDK is chosen, then no extra package dependencies will be required. However, if the Alpine-based komand/python-3-37-slim-plugin SDK is chosen, then an additional line must be added to your plugin Dockerfile, shown below:

RUN apk add --no-cache gcc libc-dev libffi-dev openssl-dev libxml2-dev libxslt-dev

Once this is built, the size is now close to double the initial size - 342MB!

So ultimately, there are three things to consider when choosing your InsightConnect plugin SDK:

  1. Dependencies
  2. Final plugin size
  3. Development experience

Have questions or comments about any of this? Feel free to post a reply and we’ll be glad to help out!