Skip to main content

Python Client for the ENSEK API (

Project description


|PyPI| |Python Versions| |Build Status|

🐍 Python Client for the ENSEK API (
This client does not implement all the features of the API, pull requests are very welcome to expand functionality.


To install ensek, simply:

.. code:: bash

pip install ensek

How To Use

Initialise the client

.. code:: python

from ensek import Ensek
client = Ensek(

Available methods

**Get an account by id**


**Get account settings by id**


**Get account live balances**



**Get tariffs for an account by id**


**Get meter points for an account by id**


**Get the account id currently associated with an MPAN core id or MPRN**


**Get the PES Area for a postcode** (`<>`_)


**Get gas utility information for a MPRN (meter point reference number)**


**Get electricity utility information for a MPAN CORE ID (meter point administration number)**


**Create a meter reading**

``client.create_meter_reading(account_id=1507, source='SMART', meter_point_id=1597, register_id=1496, value=2.0, timestamp=datetime(2018, 7, 24, 13, 49, 34, 661562, tzinfo=timezone.utc))``

**Get readings for a meter point**


**Get all customer account ids**


**Get addresses at a postcode**


**Get account attributes**


**Update account attribute**


Note: For each client method:

- If API response is 404, method will raise ``LookupError``.
- If API response is between 400 and 499, method will raise ``ValueError``.
- For any other bad status code ``EnsekError`` will raise.



1. Python 3.6+
2. See requirements.txt

Running the tests

.. code:: bash

pip install -r requirements-test.txt

Releasing to PyPI

.. code:: bash

pip install zest.releaser

.. |PyPI| image::
.. |Python Versions| image::
.. |Build Status| image::

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ENSEK-1.8.0-py2.py3-none-any.whl (4.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3
ENSEK-1.8.0.tar.gz (18.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page