Skip to content

opennem/openelectricity-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenElectricity Python SDK

A Python SDK for interacting with the OpenElectricity API. This SDK provides both synchronous and asynchronous clients for accessing OpenElectricity data.

Features

  • Synchronous and asynchronous API clients
  • Type hints for better IDE support
  • Automatic request retries and error handling
  • Context manager support for proper resource cleanup
  • Modern Python (3.12+) with full type annotations

Installation

pip install openelectricity

Quick Start

from openelectricity import Client

# Using environment variable OPENELECTRICITY_API_KEY
with Client() as client:
    # API calls will be implemented here
    pass

# Or provide API key directly
client = Client(api_key="your-api-key")

For async usage:

from openelectricity import AsyncClient
import asyncio

async def main():
    async with AsyncClient() as client:
        # API calls will be implemented here
        pass

asyncio.run(main())

Documentation

For detailed usage instructions and API reference, see the documentation.

Development

  1. Clone the repository

  2. Install development dependencies:

    make install
  3. Run tests:

    make test
  4. Format code:

    make format
  5. Run linters:

    make lint

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Official Python client for the OpenElectricity API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published