{"id":23821,"library":"gridstatus","title":"GridStatus","description":"GridStatus provides a unified Python API to access real-time and historical energy grid data from ISOs (Independent System Operators) across North America, including CAISO, ERCOT, MISO, PJM, NYISO, SPP, ISONE, and AESO. As of v0.36.0, it supports Python 3.10–3.14. The library is actively maintained with frequent releases.","status":"active","version":"0.36.0","language":"python","source_language":"en","source_url":"https://github.com/grid-status/gridstatus","tags":["energy","grid","ISO","CAISO","ERCOT","MISO","PJM","NYISO","SPP","ISONE","AESO","renewables"],"install":[{"cmd":"pip install gridstatus","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Data manipulation and output","package":"pandas","optional":false},{"reason":"HTTP requests to ISO APIs","package":"requests","optional":false},{"reason":"Date parsing helpers","package":"python-dateutil","optional":false}],"imports":[{"note":"Star imports are discouraged; use the alias gs for cleaner code.","wrong":"from gridstatus import *","symbol":"gs","correct":"import gridstatus as gs"},{"note":"Direct import of ISO classes is the recommended pattern.","symbol":"CAISO","correct":"from gridstatus import CAISO"},{"note":"The correct package name is gridstatus (no underscore).","wrong":"import grid_status","symbol":"gridstatus","correct":"import gridstatus"}],"quickstart":{"code":"import gridstatus as gs\n\n# Fetch today's fuel mix from CAISO (no API key needed for most endpoints)\ncaiso = gs.CAISO()\ntoday_mix = caiso.get_fuel_mix(date='today')\nprint(today_mix.head())","lang":"python","description":"Quickstart: Initialize an ISO instance (e.g., CAISO) and call a method like get_fuel_mix. No API key required for basic operations."},"warnings":[{"fix":"Update class names to uppercase: CAISO, ERCOT, MISO, PJM, NYISO, SPP, ISONE, AESO.","message":"ISO class names changed in v0.20.0: e.g., 'Pjm' became 'PJM'. All ISO names are now uppercase.","severity":"breaking","affected_versions":"<0.20.0"},{"fix":"Replace `get_lmp()` with the appropriate real-time or day-ahead method.","message":"The method `get_lmp()` is deprecated in v0.30.0+ in favor of `get_lmp_real_time()` and `get_lmp_day_ahead()`.","severity":"deprecated","affected_versions":">=0.30.0"},{"fix":"Pass date as '2023-10-01' or datetime.date(2023,10,1).","message":"Many ISO methods require a `date` parameter that must be a string in 'YYYY-MM-DD' format or a datetime.date object, not a datetime.datetime.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install gridstatus` in your active environment.","cause":"Library not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'gridstatus'"},{"fix":"Use `from gridstatus import CAISO` or `import gridstatus as gs` then `gs.CAISO`. For older versions (<0.20), use the old name (e.g., 'Caiso').","cause":"Trying to access an ISO class on the module level without importing it, or using an outdated version where the class name was different.","error":"AttributeError: module 'gridstatus' has no attribute 'CAISO'"},{"fix":"Convert to string: `date='2023-10-01'` or use `date.today().isoformat()`.","cause":"Passing a datetime object or wrongly formatted string as the date parameter.","error":"ValueError: Invalid date format. Expected 'YYYY-MM-DD'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}