Skip to content

Commit

Permalink
Update readme and correct packaging information
Browse files Browse the repository at this point in the history
  • Loading branch information
markallanson committed Jan 2, 2021
1 parent 38eb677 commit 42dcdae
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

# 0.1.1
* Changelog, Packaging Updates

# 0.1.0
* Consumption APIs for Gas and Electricity
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[tool.poetry]
name = "octopus-energy"
version = "0.1.0"
version = "0.1.1"
description = "Python client for the Octopus Energy RESTful API"
authors = ["Mark Allanson <[email protected]>"]
license = "MIT"
readme = "readme.md"
homepage="https://github.com/markallanson/octopus-energy"
include=["*.md"]

[tool.poetry.dependencies]
python = "^3.7"
Expand Down
34 changes: 34 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Octopus Energy Python API Client Library
A Client library for accessing the Octopus Energy APIs

[![PyPI version](https://badge.fury.io/py/octopus-energy.svg)](https://badge.fury.io/py/octopus-energy)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/octopus-energy)

[![Build Status](https://travis-ci.com/markallanson/octopus-energy.svg?branch=main)](https://travis-ci.com/markallanson/octopus-energy)
[![Coverage Status](https://coveralls.io/repos/github/markallanson/octopus-energy/badge.svg?branch=main)](https://coveralls.io/github/markallanson/octopus-energy?branch=main)

## Installation
`octopus-energy` can be installed from PyPI using pip:

```shell
pip install octopus-energy
```

## Code
The code is available in the [octopus-energy repository on GitHub][github]

## Features
* Get energy consumption from SMETS1 and SMETS2 electricity and gas meters.

## Quickstart
You can obtain your API token and meter information from the [Octopus Energy Developer
Dashboard][octo dashboard].

```python
from octopus_energy import OctopusEnergyClient, MeterType

api_token="sk_live_your-token"
mprn = "your-mprn"
serial_number = "your-meter-serial-number"

client = OctopusEnergyClient(api_token)
consumption = client.get_gas_consumption_v1(mprn, serial_number, MeterType.SMETS1_GAS)
```

[github]: https://github.com/markallanson/octopus-energy
[octo dashboard]: https://octopus.energy/dashboard/developer/

0 comments on commit 42dcdae

Please sign in to comment.