di-unipi-socc / microFreshener-core

Core python module of microFreshener that permits to discover architectural smells affectinng microservices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MicroFreshener-core


PyPI version Build Status

MicroFreshener-core is the core python module of microFreshener that permits to discover architecturl smells affectinng microservices.

Table of Contents

Architecture

microfreshener-core has 3 stages: Importer, Analyser and Exporter. Each Stage should have well defined interface so it is easy to write new Importer, Analyser or Exporters and plug it in. Currently only Importer and Exporter interfaces are defined.

Quick Guide

MicroFreshener-core is a python module distributed in PyPi.

Installation

In order to use MicroFreshener-core install the python package

$ pip install microfreshener-core

Example of usage

You can use microfreshener-core in your project by importing the class of the module.

In the following example, the YML file of the helloworld is imported and analysed. The result of the analysis is a dictionary, where for each node are listed the smells and the refactorigns to be applied.

from microfreshener.core.importer import YMLImporter
from microfreshener.core.analyser import MicroToscaAnalyserBuilder

yml_importer = YMLImporter()

model = json_importer.Import("helloworld.yml")
builder = MicroToscaAnalyserBuilder(model)
builder.add_all_sniffers()
analyser = builder.build()

res = analyser.run()
print(res)

About

Core python module of microFreshener that permits to discover architectural smells affectinng microservices.

License:MIT License


Languages

Language:Python 99.8%Language:Shell 0.2%