pyTibber
Python3 library for Tibber.
Get electricity price and consumption.
If you have a Tibber Pulse or Watty you can see your consumption in real time.
Go to developer.tibber.com/ to get your API token.
Install
pip3 install pyTibber
Example:
import tibber.const
import tibber
import asyncio
async def start():
tibber_connection = tibber.Tibber(tibber.const.DEMO_TOKEN, user_agent="change_this")
await tibber_connection.update_info()
print(tibber_connection.name)
home = tibber_connection.get_homes()[0]
await home.fetch_consumption_data()
await home.update_info()
print(home.address1)
await home.update_price_info()
print(home.current_price_info)
# await tibber_connection.close_connection()
loop = asyncio.run(start())
Example realtime data:
An example of how to subscribe to realtime data (Pulse/Watty):
import tibber.const
import asyncio
import aiohttp
import tibber
def _callback(pkg):
print(pkg)
data = pkg.get("data")
if data is None:
return
print(data.get("liveMeasurement"))
async def run():
async with aiohttp.ClientSession() as session:
tibber_connection = tibber.Tibber(tibber.const.DEMO_TOKEN, websession=session, user_agent="change_this")
await tibber_connection.update_info()
home = tibber_connection.get_homes()[0]
await home.rt_subscribe(_callback)
while True:
await asyncio.sleep(10)
loop = asyncio.run(run())
The library is used as part of Home Assistant.
Metadata
Release files for pyTibber 0.39.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytibber-0.39.1.tar.gz | 53.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytibber-0.39.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.2 kB
Release files / pytibber-0.39.1.tar.gz
| Download URL | pytibber-0.39.1.tar.gz |
|---|---|
| Size | 53.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ea218d658dede9313993aecc7a6bb84901fd547235abac91443fefc1a2bcd1e
|
|
BLAKE2b-256 checksum How to use checksums |
97c5054e7e54a74bac332131bffbfe9b958d69a7f98d19d5dbbedf12a5655563
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / pytibber-0.39.1-py3-none-any.whl
| Download URL | pytibber-0.39.1-py3-none-any.whl |
|---|---|
| Size | 38.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7e7978ba2cdfdec96a3f0ca60cbd5698eae1bb28687c65f5a446f1234d2b7c5
|
|
BLAKE2b-256 checksum How to use checksums |
6b3a95d3c20fcac643b104dcca87f1cc7871280d4a2d1c9aa903acd98b5f165b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for pyTibber 0.39.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.