The shift towards distributed generation and microgrids has renewed the interest in forecasting algorithms and methods, which need to take into account the advances in information, metering and control technologies in order to address the challenges of forecasting problems. Technologies such as machine learning have been proven useful for short-term electricity load forecasting, especially for microgrids, as they can also take into account several types of historical data and can adapt to changes often encountered in small-scale systems and on a short time scale. In this paper, we present a flexible and easily customized modular toolbox, called Divinus, for electricity use profiling and forecasting in microgrids. Divinus may support a variety of machine learning algorithms for forecasting and profiling that can be used independently or combined. For demonstration purposes, we have implemented Self-Organizing Maps for profiling and k-Neighbors for forecasting. The testing of the platform was based on electricity consumption data of the Euripus campus of the National and Kapodistrian University of Athens in Evia, Greece, from January 2010 till March 2018. The tests that have been carried out so far show that the platform can be easily customized and the algorithms examined yield high accuracy and acceptable mean errors for the case of a university campus energy profile.