Metadata-Version: 2.4
Name: odse
Version: 0.1.0
Summary: Open Data Schema for Energy - validation and transformation library
Author-email: Asoba Corporation <support@asoba.co>
License: Apache-2.0
Project-URL: Homepage, https://github.com/AsobaCloud/odse
Project-URL: Documentation, https://docs.asoba.co/ona-protocol/overview
Project-URL: Repository, https://github.com/AsobaCloud/odse
Keywords: energy,solar,iot,data,schema,validation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: jsonschema>=4.0.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"

# ODS-E: Open Data Schema for Energy

[![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-sa/4.0/)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

ODS-E is an open specification for standardizing energy asset data from IoT devices, enabling interoperability across the renewable energy ecosystem.

## Why ODS-E?

- **No Vendor Lock-in**: Your data works with any ODS-E compatible system
- **Faster Integrations**: Pre-built transforms for common OEMs (Huawei, Enphase, Solarman)
- **Analytics-Ready**: Standardized error taxonomy and semantic validation
- **Future-Proof**: CC-BY-SA licensed specification ensures extensions stay open

## Quick Start

```bash
pip install odse
```

```python
from ods_e import validate, transform

# Validate ODS-E data
result = validate("production_data.json")

# Transform from OEM format
ods_data = transform("huawei_export.csv", source="huawei")
```

## Repository Structure

```
ona-protocol/
├── LICENSE-SPEC.md       # CC-BY-SA 4.0 (specification, schemas, transforms)
├── LICENSE-CODE.md       # Apache 2.0 (reference implementation, tools)
├── spec/                 # Specification documents
├── schemas/              # JSON Schema definitions
├── transforms/           # OEM transform specifications
├── src/                  # Reference implementation
└── tools/                # CLI tools
```

## Core Schema

```json
{
  "timestamp": "2026-02-05T14:00:00Z",
  "kWh": 847.5,
  "error_type": "normal",
  "PF": 0.98
}
```

**Required fields:**
- `timestamp` - ISO 8601 with timezone
- `kWh` - Active energy (≥ 0)
- `error_type` - One of: `normal`, `warning`, `critical`, `fault`, `offline`, `standby`, `unknown`

## Supported OEMs

| OEM | Format | Status |
|-----|--------|--------|
| Huawei FusionSolar | CSV, API | ✅ Included |
| Enphase Envoy | JSON, API | ✅ Included |
| Solarman Logger | CSV | ✅ Included |
| SolarEdge | JSON API | ✅ Included |
| Fronius | JSON API | ✅ Included |
| Switch Energy | CSV | ✅ Included |

## License

- **Specification, Schemas, Transforms**: [CC-BY-SA 4.0](LICENSE-SPEC.md)
- **Reference Implementation, Tools**: [Apache 2.0](LICENSE-CODE.md)

## Documentation

- [Full Documentation](https://docs.asoba.co/ona-protocol)
- [Schema Reference](https://docs.asoba.co/ona-protocol/schemas)
- [Transform Guide](https://docs.asoba.co/ona-protocol/transforms)

## Contributing

Contributions are welcome. Schema and transform contributions must be licensed under CC-BY-SA 4.0.

---

Maintained by [Asoba Corporation](https://asoba.co)
