Metadata-Version: 2.5
Name: india-energy-atlas
Version: 0.1.0
Summary: Python client for the India Energy Atlas forecast, scorecard and event API
Project-URL: Homepage, https://www.energymap.in/developer
Project-URL: Documentation, https://www.energymap.in/developer
Project-URL: Changelog, https://pypi.org/project/india-energy-atlas/#history
Author-email: Team Energy Atlas <hello@energymap.in>
License: Apache-2.0
License-File: LICENSE
Keywords: electricity,energy,forecast,iex,india,power market
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: pandas>=2.0
Description-Content-Type: text/markdown

# india-energy-atlas

Python client for the [India Energy Atlas](https://www.energymap.in) forecast, scorecard and event API.
Every forecast comes from the Atlas vintage archive exactly as it was published, and every call returns a
pandas DataFrame.

```bash
pip install india-energy-atlas
```

You need an API key: create one at https://www.energymap.in/settings#api-keys and set it as
`ENERGYATLAS_API_KEY` (in Google Colab, as a notebook secret of that name).

```python
from india_energy_atlas import Client

atlas = Client()                              # reads ENERGYATLAS_API_KEY
dam = atlas.dam()                             # the newest next-day DAM forecast: 96 blocks, p10/p50/p90 in INR/MWh
rtm = atlas.rtm(variant="intraday")           # the rolling RTM forecast, each block's newest issue
outlook = atlas.outlook(days=14)              # D+1..D+14 DAM outlook
scores = atlas.scores(window_days=30)         # the forecast scorecard
events = atlas.events(type="price_cap_day")   # the Grid Event Ledger
sheet = atlas.forecast_csv("DAM")             # the desk block sheet, CSV bytes
prices = atlas.prices("2026-09-01", "2026-09-30")  # IEX clearing prices, one row a block

# Growth and Enterprise plans: any forecast as it stood at a time
from datetime import datetime
from zoneinfo import ZoneInfo
then = atlas.vintages("DAM", "2026-10-05", as_of=datetime(2026, 10, 4, 6, 5, tzinfo=ZoneInfo("Asia/Kolkata")))
```

`df.attrs["meta"]` holds the response's metadata: issue time, unit, plan access and the monthly quota left.

| Error | When |
|---|---|
| `AuthError` | 401: the key is missing, invalid, revoked or expired. |
| `NotInPlan` | 402: the plan does not include it. `required_level` names the level that does. |
| `QuotaExceeded` | 429: a quota is used. `resets_at` gives the monthly reset, `retry_after` the seconds. |
| `ApiError` | Any other error status. |

The API, its plans and their limits: https://www.energymap.in/developer.

Not to be confused with the `energyatlas` package on PyPI, which is a different project.

## Licence

Apache-2.0.
