Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 693 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 693 Bytes

Python Singularity Energy SDK

This package is the Python integration for real time energy data powered by Singularity

Read the full documentation on our readthedocs page

Examples

Here are a couple examples you can use to get started:

from datetime import datetime, timedelta
from singularity import SingularityAPI, Regions, APIException


singularity = SingularityAPI('API_KEY')


end = datetime.utcnow()
start = end - timedelta(hours=4)
events, pagination = singularity.search_region_events(
  Regions.ISONE,
  'carbon_intensity',
  start.isoformat() + 'Z',
  end.isoformat() + 'Z'
)