Skip to main content

A Python CLI tool for exporting cost reports over Multi-providers AWS/Azure.

Project description

Welcome to eraXplor

Cost Export Tool for automated cost reporting and analysis.

eraXplor is an automated cost reporting tool designed for assest DevOps and FinOps teams fetching and sorting AWS and Azure Cost Explorer. it extracts detailed cost data by calling nativly cloud provider APIs directly and Transform result into CSV file. eraXplor gives you the ability to sort the cost with wide range of options:

  • For AWS you able to sort cost by Account, Service, Usage Type or even By Purchase Type; as well as format and separate the result by Monthly or Daily.
  • For Azure you able to sort cost by Subscription, as well as format and separate the result by Monthly or Daily.

azure still under development, more features will be added soon.

Key Features

  • Cloud provider Separated tools: Separated tool for each cloud provider (AWS and Azure) avoiding complexty.
  • Flexible Date Ranges: Custom start/end dates with validation.
  • Multi-Profile Support: Works with all configured AWS profiles.
  • CSV Export: Ready-to-analyze reports in CSV format.
  • Cross-platform CLI Interface: Simple terminal-based workflow, and Cross OS platform.
  • Documentation Ready: Well explained documentations assest you kick start rapidly.
  • Open-Source: the tool is open-source under Apache 2.0 license, which enables your to enhance it for your purpose.

Table Of Contents

Quickly find what you're looking for depending on your use case by looking at the different pages.

AWS (eraXplor)

  1. Overview
  2. Tutorials
  3. How-To Guides
  4. Concepts & Explanation

Azure (eraXplor_az)

  1. Overview
  2. Tutorials
  3. How-To Guides
  4. Concepts & Explanation

How-To Guides

Check installed Python version

  • Ensure you Python version is >= 3.12.3 by:
python --version

# Consider update Python version if less than 3

Install eraXplor

  • Install eraxplor too by:
pip install eraXplor

How-To-Guide - AWS

AWS profile configuration

  • Install AWS CLI - Command line tool.
  • Create an AWS AMI user then extract Access ID & key.
  • Configure AWS CLI profile by:
aws configure <--profile [PROFILE_NAME]>
# ensure you set a defalut region.

How-To use - AWS

eraXplor have multiple arguments set with a default values -explained below-, Adjsut these arguments as required.

eraXplor <--start-date [yyyy-MM-DD]> <--end-date [yyyy-MM-DD]> \
<--profile [PROFILE-NAME]> \
<--groupby [LINKED_ACCOUNT | SERVICE | PURCHASE_TYPE | USAGE_TYPE]> \
<--out [file.csv]>
<--granularity [DAILY | MONTHLY]>

Argument Reference - AWS

  • --start-date, -s: (Not_Required) Default value set as six months before.
  • --end-date, -e: (Not_Required) Default value set as Today date.
  • --profile, -p: (Not_Required) Default value set as default.
  • --groupby, -g: (Not_Required) Default value set as LINKED_ACCOUNT. The available options are (LINKED_ACCOUNT, SERVICE, PURCHASE_TYPE, USAGE_TYPE)
  • --out, -o: (Not_Required) Default value set as cost_repot.csv.
  • --granularity, -G: (Not_Required) Default value set as MONTHLY. The available options are (MONTHLY, DAILY)

How-To-Guide - Azure

Azure CLI Authentication

  • Install Azure CLI - Command line tool by specifing your attended OS.
  • ensure your account have sufficient permission as Billing Reader or Usage Billing Contributor to manage Azure billing.
  • Check installed package by:
az --version
  • Authenticate using your Azure account:
az login

This will open the portal in your default browser to authenticate.

How-To use - Azure

eraXplor_az have multiple arguments set with a default values -explained below-, Adjsut these arguments as required.

eraXplor_az <--start-date [yyyy,MM,DD]> <--end-date [yyyy,MM,DD]> \
<--subscription_id [SUBSCRIPTION_ID]> \
<--granularity [DAILY | MONTHLY]> \
<--output [FILE_NAME.CSV]>

Argument Reference - Azure

  • --start-date or -s: (Optional) Default value set as three months before.
  • --end-date or -e: (Optional) Default value set as Today date.
  • --subscription_id or -S: (Required) subscription id.
  • --out or -o: (Optional) Default value set as az_cost_report.csv.
  • --granularity or -g: (Optional) Default value set as MONTHLY. The available options are (MONTHLY, DAILY)

For Windows/PowerShell users restart your terminal, and you may need to use the following command:

python -m eraXplor

# Or
python -m eraXplor_az  # for auzre

# to avoid using this command, apend the eraXplor to your paths.
# Normaly its under: C:\Users\<YourUser>\AppData\Local\Programs\Python\Python<version>\Scripts\

About the Author

👋Show/Hide Author Details👋

Mohamed eraki
Cloud & DevOps Engineer

Email
LinkedIn
Twitter
Blog

Project Philosophy

"I built eraXplor to solve real-world cloud cost visibility challenges — the same pain points I encounter daily in enterprise environments. This tool embodies my belief that financial accountability should be accessible to every technical team."

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eraxplor-3.1.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eraxplor-3.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file eraxplor-3.1.0.tar.gz.

File metadata

  • Download URL: eraxplor-3.1.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for eraxplor-3.1.0.tar.gz
Algorithm Hash digest
SHA256 534c5c645c00e4a00ae6b3d13f4c28e9a6a9dca2013b9d6fc755a271c7330b17
MD5 c91820d26cf9f496a950cf3109aacd5e
BLAKE2b-256 bcc16033d2e0dbfc882e9e1bf7710e6de269be2fbb121ae446665f83ccd8a1c1

See more details on using hashes here.

File details

Details for the file eraxplor-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: eraxplor-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for eraxplor-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de3947c538385412560eb1c2065b9f002f295944998b206633dec88af341bd2a
MD5 0a6b90169d2f7fa4b93377910d282421
BLAKE2b-256 dbf46385151d63794f0bd2acc3abb151cb4cac1e3419bec5617edf20e480bd0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page