GithubHelp home page GithubHelp logo

pesc's Introduction

Pesc-api

Simple python module which provide access to data from ikus.pesc.ru. Before you use the wrapper you need to register on the site.

Authentication

>>> from pesc import PescClient
>>> client = PescClient()
>>> client.auth('[email protected]', 'xxx-xxx-xxx-xxx')
{'authenticationSuccess': True}

Accounts

>>> accounts = client.accounts
>>> account = accounts[0]

Bills

>>> bills = account.get_bills(date_from='30.12.2010', date_to='01.01.2016')
>>> bills[0]
{'billId': 130098827, 'period': '01-01-2016', 'billNumber': 52, 'sum': 0.31}

Payments

>>> payments = accounts[0].get_payments(date_from='01.01.2018', date_to='30.05.2018')
>>> payments[0]
{'date': '09-01-2018', 'sum': 1020.74, 'type': 'Счет', 'charge': 1020.74, 'fine': 0.0, 'period': '01-01-2018', 'checkExists': True, 'status': 'DONE'}

Meters

>>> meters = accounts[0].meters
>>> meter = meters[0]
>>> meter.info
{'meterId': 4512623, 'meterNumber': '031296508', 'meterModel': 'ЦЭ2726-12', 'installationDate': '06-06-2011', 'installationPlace': 'КВАРТИРА', 'owner': 'Абонент', 'precision': '1,0', 'voltage': '220', 'current': '5-60', 'calibrationInterval': None, 'tarifficationPlan': 'Двухтарифный', 'relationType': {'relationTypeText': 'Индивидуальный', 'relationTypeCode': 'INDIVIDUAL'}, 'meterState': {'meterStateText': 'Исправный', 'meterStateCode': 'WORKING'}, 'meterType': {'meterTypeText': 'Обычный ПУ', 'meterTypeCode': 'REGULAR'}, 'accountStatus': None, 'numberOfDigitsInScale': 6, 'numberOfScales': 2, 'scales': ['DAY', 'NIGHT']}

Indications

Get indications

>>> indications = meter.get_indications(date_from='01.01.2018', date_to='30.05.2018')
>>> indications[0]
{'type': 'Заявленные показания', 'date': '22-09-2018', 'scaleValues': [{'scale': 'DAY', 'value': 14867}, {'scale': 'NIGHT', 'value': 7092}]}

Post indication

>>> meter.post_indication(day=105, night=10)

pesc's People

Contributors

we1tkind avatar

Watchers

 avatar

Forkers

s1nav

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.