Skip to content

singularity-energy/singularity-energy-python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
)