Multi-cloud FinOps Python library for cost analysis
Project description
FinOps Multi-Cloud Python Library
Overview
This Python library is designed to empower FinOps engineers to manage and optimize cloud spending across AWS, Azure, and Google Cloud. It provides real-time cost analysis by querying each cloud's billing APIs, normalizes the data into a common format, and lays the groundwork for future automation features such as anomaly detection, AI/ML-powered forecasting, and policy enforcement.
Key FinOps Principles
- Cost Visibility & Timeliness: Immediate access to up-to-date cost data.
- Accountability: Empowering teams to monitor and own their cloud spending.
- Collaboration: Encouraging cross-functional teamwork between finance, engineering, and operations.
- Centralized Governance: Consolidating cost management and enforcing policies across clouds.
- Optimization & Automation: Continuously identifying and acting on cost-saving opportunities.
High-Level Goals
- Provide a unified multi-cloud view of costs via real-time API queries.
- Offer modular design to support future enhancements such as automation, anomaly detection, and forecasting.
- Enable FinOps engineers to work via a command-line interface (CLI) with a moderate learning curve.
FinOps CLI
A command-line tool for multi-cloud cost analysis and optimization.
Features
- Cost Reporting: Generate detailed cost reports across AWS, Azure, and GCP.
- Anomaly Detection: Identify unusual spending patterns.
- Cost Forecasting: Predict future cloud costs.
- Optimization Recommendations: Get suggestions for reducing cloud spending.
- Budget Management: Set and track budgets for specific teams and projects.
- Cost Efficiency Scoring: Calculate and interpret cost efficiency scores to assess cloud spending efficiency.
- Enhanced Reporting: Generate cost breakdowns by service and region.
Installation
-
Clone the repository:
git clone https://github.com/ZacheryKuykendall/finops-cli.git cd finops-cli
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the dependencies:
pip install -e .
Usage
finops-cli --help
Cost Reporting
Generate cost reports for a specified date range:
finops-cli report --start-date YYYY-MM-DD --end-date YYYY-MM-DD --format [markdown|csv|json] --test
--start-date: Start date for the report (YYYY-MM-DD).--end-date: End date for the report (YYYY-MM-DD).--format: Output format (markdown, csv, or json). Default is markdown.--test: Use test data instead of live cloud data.--export: Export the report to a file.
Budget Management
Set a budget for a specific team and project:
finops-cli set-budget --team TEAM_NAME --project PROJECT_NAME --amount AMOUNT --start-date YYYY-MM-DD --end-date YYYY-MM-DD
Track spending against the budget:
finops-cli track-budget --team TEAM_NAME --project PROJECT_NAME --start-date YYYY-MM-DD --end-date YYYY-MM-DD --test
--team: Team name for the budget.--project: Project name for the budget.--amount: Budget amount in USD.--start-date: Start date for the budget (YYYY-MM-DD).--end-date: End date for the budget (YYYY-MM-DD).--test: Use test data instead of live cloud data.
Cost Efficiency Scoring
Calculate and display the cost efficiency score:
finops-cli cost-efficiency-score --start-date YYYY-MM-DD --end-date YYYY-MM-DD --forecast FORECAST_AMOUNT --test
--start-date: Start date for the score calculation (YYYY-MM-DD).--end-date: End date for the score calculation (YYYY-MM-DD).--forecast: Forecasted total spend for the period.--test: Use test data instead of live cloud data.
Enhanced Reporting
Generate a cost breakdown by service:
finops-cli cost-by-service --start-date YYYY-MM-DD --end-date YYYY-MM-DD --test
Generate a cost breakdown by region:
finops-cli cost-by-region --start-date YYYY-MM-DD --end-date YYYY-MM-DD --test
--start-date: Start date for the report (YYYY-MM-DD).--end-date: End date for the report (YYYY-MM-DD).--test: Use test data instead of live cloud data.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file finops_lib-1.1.0.tar.gz.
File metadata
- Download URL: finops_lib-1.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69303b7a48bf4c336995028f183a3e84adad61f39f2d20c6535336804eafb537
|
|
| MD5 |
c88b815d4d0643987967db870c631586
|
|
| BLAKE2b-256 |
e87941918a6244fc88c4c82cdab4e85a4f7f0f4e7c90b1341af09ab6085da63c
|
File details
Details for the file finops_lib-1.1.0-py3-none-any.whl.
File metadata
- Download URL: finops_lib-1.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c70fb1cbcbf43cbab622042b5c01b34e3feefab18d26fbefd7c8f39db1775fb
|
|
| MD5 |
c4fb72ad4993a57075037047e38587fd
|
|
| BLAKE2b-256 |
71f5fcb720ce3a482637e3c7d29c97f419ef64d87ba994be69949a2c282f72df
|