CloudCostChefs Tools
Sustainability

OCI Carbon EmissionsData Collector

Professional Python script that harvests carbon emissions data from Oracle Cloud Infrastructure like a sustainability chef gathering premium ingredients. Generate comprehensive reports for data-driven environmental optimization.

Oracle Cloud
Python Script
CSV & JSON Export

Multi-Compartment Collection

Harvest data across your entire OCI tenancy

Flexible Export Formats

CSV and JSON outputs for any dashboard

Enterprise Authentication

OCI config file and profile support

🌱
📊

🍳 Quick Start Guide

Get your OCI carbon emissions data cooking in minutes with our step-by-step recipe for sustainability success.

1

Setup & Authentication

• Install OCI SDK: pip install oci

• Configure OCI credentials and profile

• Verify Usage API access permissions

2

Run Your First Collection

• Start with single compartment testing

• Use monthly granularity for initial runs

• Verify data availability and format

3

Scale & Automate

• Expand to enterprise-wide collection

• Schedule automated monthly reports

• Integrate with sustainability dashboards

🌍 Comprehensive Carbon Intelligence

Our OCI Carbon Emissions Collector provides enterprise-grade features for complete sustainability visibility across your Oracle Cloud Infrastructure.

Multi-Compartment Collection

Harvest carbon emissions data across your entire OCI tenancy with compartment-specific filtering and aggregation.

Flexible Export Formats

Generate CSV and JSON reports optimized for Power BI, Tableau, and custom sustainability dashboards.

Enterprise Authentication

OCI config file and profile-based authentication with support for multiple tenancies and environments.

Advanced Filtering

Service, region, compartment, and time-based filtering with support for complex query combinations.

Multiple Granularities

Daily and monthly carbon emissions reporting with automatic date validation and formatting.

Comprehensive Error Handling

Detailed error reporting with troubleshooting guidance and graceful handling of API limitations.

Flexible Date Ranges

Custom date range selection with automatic first-of-month validation and data availability checks.

Multiple Emission Types

Location-based and market-based carbon emission calculations with power-based and spend-based methods.

🍳 Recipe Examples

Master the art of carbon data collection with these proven recipes for different sustainability scenarios.

Basic Monthly Collection

Perfect for getting started with carbon emissions tracking across your OCI environment.

python oci_carbon_emissions.py \
  --start-date 2024-01-01 \
  --end-date 2024-03-01 \
  --output-format csv
Quick testing and development

Compartment-Specific Analysis

Target specific compartments for detailed carbon footprint analysis and optimization.

python oci_carbon_emissions.py \
  --start-date 2024-01-01 \
  --end-date 2024-02-01 \
  --compartment-ids comp1,comp2 \
  --group-by service,region \
  --output-format json
Targeted analysis and optimization

Daily Granularity Reporting

Generate detailed daily carbon emissions reports for precise tracking and analysis.

python oci_carbon_emissions.py \
  --start-date 2024-01-01 \
  --end-date 2024-01-31 \
  --granularity DAILY \
  --emission-type MARKET_BASED \
  --output-format csv
Detailed daily tracking

Enterprise Automation

Automated execution for scheduled sustainability reporting with custom profiles.

python oci_carbon_emissions.py \
  --config-file /path/to/config \
  --profile PRODUCTION \
  --start-date 2024-01-01 \
  --end-date 2024-02-01 \
  --limit 500 \
  --summary
Scheduled monthly reporting

🔧 Technical Specifications

Enterprise-grade carbon emissions collection with comprehensive OCI integration and professional-quality output formats.

Requirements

Python 3.6+ with OCI SDK

Install with: pip install oci

OCI Configuration

Config file or environment variables properly configured

Usage API Access

Permissions on target OCI compartments

Internet Connectivity

Access to OCI API endpoints

Data Availability Understanding

Carbon data is available monthly with processing delays

Configuration Options

Emission Types

Location-based: Based on grid emission factors

Market-based: Based on contractual arrangements

Calculation Methods

Power-based: Energy consumption calculations

Spend-based: Financial spend calculations

Output Formats

CSV: Optimized for Excel and dashboard tools

JSON: Structured data for API integration

Granularity Options

Daily: Detailed day-by-day tracking

Monthly: Month-over-month trends

👨‍🍳 Chef's Best Practices

Master the art of carbon emissions collection with these proven techniques from the CloudCostChefs kitchen.

Start Small, Scale Smart

Begin with a single compartment and monthly granularity to test authentication and service availability before scaling to enterprise-wide carbon data collection.

Pro Tip: Like testing a new recipe with a small portion first, validate your setup with limited scope before expanding to full production collection.

Monthly Automation Schedule

Schedule monthly runs on the 5th to ensure data availability for the previous month. Carbon data typically has processing delays.

Implementation: Use cron jobs or task schedulers with OCI config file authentication for automated reporting.

Choose Appropriate Granularity

Use monthly granularity for trend analysis and executive reporting. Reserve daily granularity for detailed optimization analysis.

Performance: Monthly reports are faster and more suitable for dashboard consumption and trend analysis.

Monitor and Review Errors

The script provides detailed error messages with troubleshooting guidance. Review error logs regularly and address permission or service issues.

Error Handling: Common issues include API limits, permission errors, and data availability delays.

🍳 Ready to Start Cooking?

Download the OCI Carbon Emissions Data Collector and start harvesting sustainability insights from your Oracle Cloud Infrastructure today.

OCI Carbon Emissions Collector

Professional Python script with comprehensive OCI integration, flexible export formats, and enterprise-grade error handling.

Multi-compartment carbon data collection
CSV and JSON export formats
Enterprise authentication support
Comprehensive error handling

Why CloudCostChefs?

No Enterprise Bloat

Practical, actionable tools without unnecessary complexity or vendor lock-in.

Community-Driven

Open-source tools developed by practitioners for practitioners.

Immediate Value

Start collecting carbon emissions data in minutes, not months.