Welcome to eraXplor
Cost Export Tool for automated cost reporting and analysis.
eraXplor is an automated cost reporting tool designed for assist DevOps and FinOps teams fetching and sorting AWS and Azure Cost Explorer.
it extracts detailed cost data by calling natively 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.
Key Features
- Cloud provider Separated tools: Separated tool for each cloud provider (e.g. AWS and Azure) avoiding complexity.
- Flexible Date Ranges: Custom start/end dates with validation.
- Multi-Profile Support: Works with all configured AWS profiles.
- Multi-Subscription Support: Works to list all configured Azure subscriptions.
- Enhanced Grouping Options: Advanced grouping for AWS (Account+Service, Account+Purchase Type, Account+Usage Type) and Azure (Subscriptions, Services, Resource groups).
- REST API Support: FastAPI-based REST API for programmatic cost data access with JSON responses.
- CSV Export: Ready-to-analyze reports in CSV format.
- Cross-platform CLI Interface: Simple terminal-based command-line, and Cross OS platform.
- Documentation Ready: Well explained documentations assist 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
Azure
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
REST API
eraXplor includes a FastAPI-based REST API that allows you to programmatically export cost data from both AWS and Azure.
Start the API Server
# From the api directory
cd api
uvicorn main:app --reload --host 0.0.0.0 --port 8000
The API will be available at http://localhost:8000
Interactive API test Swagger UI under http://localhost:8000/docs
API Endpoints
AWS Cost Export
POST /aws/cost/export
curl -X POST "http://localhost:8000/aws/cost/export" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2025-01-01",
"end_date": "2025-03-30",
"profile": "default",
"group_by": "LINKED_ACCOUNT",
"granularity": "MONTHLY"
}'
GET /aws/cost/export
curl "http://localhost:8000/aws/cost/export?start_date=2025-01-01&end_date=2025-03-30&profile=default&group_by=LINKED_ACCOUNT&granularity=MONTHLY"
Azure Cost Export
POST /azure/cost/export
curl -X POST "http://localhost:8000/azure/cost/export" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2025-01-01",
"end_date": "2025-03-30",
"granularity": "Monthly",
"group_by": "subscription"
}'
GET /azure/cost/export
curl "http://localhost:8000/azure/cost/export?start_date=2025-01-01&end_date=2025-03-30&granularity=Monthly&group_by=subscription"
API Response Format
{
"success": true,
"message": "AWS cost data exported successfully",
"total_records": 5,
"cost_data": [...],
"request_parameters": {
"start_date": "2025-01-01",
"end_date": "2025-03-30",
"profile": "default",
"group_by": "LINKED_ACCOUNT",
"granularity": "MONTHLY"
}
}
API Documentation (Swagger UI)
Visit http://localhost:8000/docs for interactive API documentation.
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-aws 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 | LINKED_ACCOUNT-With-SERVICE | LINKED_ACCOUNT-With-PURCHASE_TYPE | LINKED_ACCOUNT-With-USAGE_TYPE]> \
<--out [file.csv]>
<--granularity [DAILY | MONTHLY]>
Argument Reference - AWS
--start-date,-s: (Not_Required) Default value set as three months before.--end-date,-e: (Not_Required) Default value set as Today date.--profile,-p: (Not_Required) Default value set asdefault.--groupby,-g: (Not_Required) Default value set as LINKED_ACCOUNT. The available options are (LINKED_ACCOUNT,SERVICE,PURCHASE_TYPE,USAGE_TYPE,LINKED_ACCOUNT-With-SERVICE,LINKED_ACCOUNT-With-PURCHASE_TYPE,LINKED_ACCOUNT-With-USAGE_TYPE)--out,-o: (Not_Required) Default value set ascost_repot.csv.--granularity,-G: (Not_Required) Default value set asMONTHLY. The available options are (MONTHLY,DAILY)
Example Usage - AWS
eraXplor-aws
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 ReaderorUsage Billing Contributorto 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-azure 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]> \
<--group-by [subscription | ServiceName | ResourceGroupName]> \
<--granularity [DAILY | MONTHLY]> \
<--output [FILE_NAME.CSV]>
Argument Reference - Azure
--start-dateor-s: (Optional) Default value set as three months before.--end-dateor-e: (Optional) Default value set as Today date.--group-byor-g: (Optional) Default value set assubscription. Available options: (subscription,ServiceName,ResourceGroupName)--outor-o: (Optional) Default value set asaz_cost_report.csv.--granularityor-G: (Optional) Default value set asMONTHLY. The available options are (MONTHLY,DAILY)
Azure Commands
Example Usage - Azure
eraXplor-azure
For Windows/PowerShell users restart your terminal, and you may need to use the following command:
python -m eraXplor-aws
# Or
python -m eraXplor-azure
# 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 Consultant
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."
Metadata
Release files for eraXplor 3.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eraxplor-3.3.0.tar.gz | 20.8 kB | Without provenance | Details for eraxplor-3.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eraxplor-3.3.0-py3-none-any.whl | Python 3 | none | any | Details for eraxplor-3.3.0-py3-none-any.whl |
Total release size: 45.6 kB
Release files / eraxplor-3.3.0.tar.gz
| Download URL | eraxplor-3.3.0.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22056a4266d836f14c192ed473355591bd116daaa1ec4f6ab541902476178186
|
|
BLAKE2b-256 checksum How to use checksums |
892ee3c6decd1270e5332b2e2d21e92ca6237a0603e38d0a8dfa6147838c89c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / eraxplor-3.3.0-py3-none-any.whl
| Download URL | eraxplor-3.3.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6076ec7b7cbc1bda3267ef2e089ad0e8a1a855352ffcadc40d68aacfd031b044
|
|
BLAKE2b-256 checksum How to use checksums |
256762aefc53bb62e3a2063870fbf4a63b4899e1607839fc9260b8ffe96cca8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for eraXplor 3.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.