Cloud-resource-matcher

Latest version: v0.2.0

Safety actively analyzes 623567 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.0

This release updates to `optiframe` v0.5.0 to use the new API naming conventions.

0.1.0

This is the first release of `cloud_resource_matcher`, a framework for cloud cost optimization.

It provides modules for the [`optiframe`](https://github.com/TimJentzsch/optiframe) optimization framework to allow you to model your cloud infrastructure and obtain a cost-optimal solution.

You can install it via `pip install cloud_resource_matcher`.
You should install `optiframe` and [`pulp`](https://github.com/coin-or/pulp) as well.

Afterwards, you can use it as follows:

py
from pulp import LpMinimize
from optiframe import Optimizer, SolutionObjValue
from cloud_resource_matcher.modules.base import BaseData, BaseSolution, base_module
from cloud_resource_matcher.modules.performance import PerformanceData, performance_module

Specify the data of the problem instance
base_data = BaseData(...)
performance_data = PerformanceData(...)

solution = (
Optimizer("cloud_cost_optimization", sense=LpMinimize)
Configure which modules you want to use
.add_modules(base_module, performance_module)
Add the data of the problem instance
.initialize(base_data, performance_data)
Obtain the optimal solution to the problem
.solve()
)

Extract the total cost of the solution
cost = solution[SolutionObjValue].objective_value
Determine which cloud resource should be matched to which cloud service
matching = solution[BaseSolution]

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.