Python client library for the Provident (MeterConnex) API
Project description
provident-py
Python client library for the Provident (MeterConnex) utility monitoring API. Supports both synchronous and asynchronous usage with full type safety.
Installation
pip install provident
Quick Start
from datetime import date
from provident import MeterType, Period, ProvidentClient, ProvidentConfig
config = ProvidentConfig(base_url="https://provident.meterconnex.com")
with ProvidentClient(config) as client:
# Authenticate
result = client.login("account-id", "password")
if not result.success:
print(result.msg)
return
# Read meter data
electricity = client.get_chart_data(
MeterType.ELECTRICITY, Period.MONTH, date(2026, 1, 1)
)
print(f"Units: {electricity.units}") # kWh
print(f"Data: {electricity.data}") # [1.79, 2.76, ...]
# Read all meter types
for meter in [MeterType.COLD_WATER, MeterType.HOT_WATER, MeterType.ELECTRICITY]:
data = client.get_chart_data(meter, Period.YEAR, date(2026, 1, 1))
print(f"{meter.value}: {len(data.data)} data points in {data.units}")
Async Usage
from datetime import date
from provident import AsyncProvidentClient, MeterType, Period, ProvidentConfig
config = ProvidentConfig(base_url="https://provident.meterconnex.com")
async with AsyncProvidentClient(config) as client:
await client.login("account-id", "password")
result = await client.get_chart_data(
MeterType.ELECTRICITY, Period.DAY, date(2026, 6, 1)
)
print(result.data)
API Reference
Client Classes
| Class | Description |
|---|---|
ProvidentClient(config) |
Synchronous client. Use as a context manager. |
AsyncProvidentClient(config) |
Asynchronous client. Use as an async context manager. |
Authentication
| Method | Returns | Description |
|---|---|---|
login(username, password, *, remember_me=False) |
LoginResult |
Authenticate with the API. Session is persisted via cookies. |
check_login() |
bool |
Check if the current session is still authenticated. |
is_authenticated |
bool |
Property — checks if the auth cookie is present. |
Meter Data
| Method | Returns | Description |
|---|---|---|
get_chart_data(meter_type, period, start) |
ChartDataResult |
Fetch usage data for a meter type and time period. |
Enums
MeterType
| Value | API String |
|---|---|
COLD_WATER |
"Cold Water" |
ELECTRICITY |
"Electricity" |
HOT_WATER |
"Hot Water" |
Period
| Value | Data Points |
|---|---|
DAY |
24 (hourly) |
MONTH |
28–31 (daily) |
YEAR |
12 (monthly) |
Models
| Model | Fields |
|---|---|
LoginResult |
success: bool, msg: str | None |
ChartDataResult |
error: bool, units: str | None, data: list[float] |
Errors
All exceptions inherit from ProvidentError.
| Exception | HTTP Status | Description |
|---|---|---|
ProvidentAPIError |
4xx | Base class for API errors. Includes status_code, message, headers, body. |
ProvidentAuthenticationError |
401 | Invalid or expired credentials. |
ProvidentNotFoundError |
404 | Requested resource not found. |
ProvidentRateLimitError |
429 | Rate limit exceeded. Includes retry_after. |
ProvidentServerError |
5xx | Server error. Includes stack_trace, exception_type from ASP.NET. |
ProvidentConnectionError |
N/A | Network-level failure (timeout, DNS, etc.). |
Requirements
Support
If this project saved you some time, consider buying me a beer 🍺!
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file provident-0.1.3.tar.gz.
File metadata
- Download URL: provident-0.1.3.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
366a949fd7ee0020282649a81642d9ae56ee9e1f4a11eb1106185b7132ea93a9
|
|
| MD5 |
9c2d4823d3e4638a9254f190e794f194
|
|
| BLAKE2b-256 |
ec4095ec9f76dd16af8bfaa29ff80a7ff3fce08c86e12d64f00ac4e72b57563b
|
Provenance
The following attestation bundles were made for provident-0.1.3.tar.gz:
Publisher:
release.yml on dangreco/provident-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
provident-0.1.3.tar.gz -
Subject digest:
366a949fd7ee0020282649a81642d9ae56ee9e1f4a11eb1106185b7132ea93a9 - Sigstore transparency entry: 1766210239
- Sigstore integration time:
-
Permalink:
dangreco/provident-py@5b2ba76db497f15e6710eb380721d5b2d7624bb6 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/dangreco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b2ba76db497f15e6710eb380721d5b2d7624bb6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file provident-0.1.3-py3-none-any.whl.
File metadata
- Download URL: provident-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f89db14801149ffe729e2b46eed5b158d1a412606c172ad46cc5c3cdaeffd9a8
|
|
| MD5 |
2e4a74f7ec677b4ce4422e1702b16979
|
|
| BLAKE2b-256 |
0f89e3f7bdfe669d0f8da904e4bbbaf45269c5614293399309d1ad0cee51defa
|
Provenance
The following attestation bundles were made for provident-0.1.3-py3-none-any.whl:
Publisher:
release.yml on dangreco/provident-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
provident-0.1.3-py3-none-any.whl -
Subject digest:
f89db14801149ffe729e2b46eed5b158d1a412606c172ad46cc5c3cdaeffd9a8 - Sigstore transparency entry: 1766210462
- Sigstore integration time:
-
Permalink:
dangreco/provident-py@5b2ba76db497f15e6710eb380721d5b2d7624bb6 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/dangreco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b2ba76db497f15e6710eb380721d5b2d7624bb6 -
Trigger Event:
push
-
Statement type: