Skip to main content

provident-py

CI PyPI Python License

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_utilities() list[str] List the utility names available on the account, e.g. ["Cold Water", "Electricity", "Hot Water"].
get_chart_data(meter_type, period, start) ChartDataResult Fetch usage data for a meter type and time period.

meter_type accepts a MeterType or a plain string, so names returned by get_utilities() can be passed straight back in — useful for accounts whose utilities fall outside MeterType.

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]

ChartDataResult.error mirrors an upstream flag and is independent of whether data is populated — the API is observed returning error: true alongside a complete dataset. Check data to decide whether a response is usable.

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

MIT

Metadata

Release files for provident 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for provident 0.1.4
File Size Uploaded Provenance
provident-0.1.4.tar.gz 31.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for provident 0.1.4
File Interpreter ABI Platform
provident-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 42.2 kB

Release files / provident-0.1.4.tar.gz

Download URL provident-0.1.4.tar.gz
Size 31.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c09f3b7e1e24daccc6179fbfaa71896c00484d2728074d2e3c640ff4f372d1db
BLAKE2b-256 checksum
How to use checksums
afb83f0ac94165953a39b16f91473e6b899e4f2a694f1dfa1b654951834848af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release files / provident-0.1.4-py3-none-any.whl

Download URL provident-0.1.4-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2aa25b783c36fed065962ebfdb44c5aa031d02a89405849d0b7973f30e23b89b
BLAKE2b-256 checksum
How to use checksums
bec890d8ab2cf93cc596a284584d0312b3b1ca93d698d7902377191557e24a02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Security for provident 0.1.4

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for provident-0.1.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page