Skip to main content

Python library for the ista calista service

Project description

PyCalista-ista

PyPI version Downloads GitHub issues GitHub forks GitHub stars GitHub license GitHub Release Date codecov OpenSSF Best Practices


Unofficial Python library for the Ista Calista service API. This library allows you to interact with your Ista Calista account to retrieve consumption data from heating and water meters.

This project is based on ecotrend-ista

Features

  • Login and session management
  • Retrieve consumption data for heating and water meters
  • Parse Excel reports from Ista Calista
  • Support for different meter types (heating, hot water, cold water)
  • Automatic handling of session expiration

Installation

From PyPI

pip install pycalista-ista

For Development

git clone https://github.com/herruzo99/pycalista-ista.git
cd pycalista-ista
pip install -e .

Usage

from pycalista_ista import PyCalistaIsta
from datetime import date

# Initialize the client
client = PyCalistaIsta("your@email.com", "your_password")

# Login to the service
client.login()

# Get device history for a date range
start_date = date(2025, 1, 1)
end_date = date(2025, 1, 31)
devices = client.get_devices_history(start_date, end_date)

# Access device data
for serial, device in devices.items():
    print(f"Device {serial} at {device.location}")
    print(f"Last reading: {device.last_reading}")
    print(f"Last consumption: {device.last_consumption}")

Development

Setup Development Environment

  1. Clone the repository:
git clone https://github.com/herruzo99/pycalista-ista.git
cd pycalista-ista
  1. Install development dependencies:
pip install -e ".[dev]"
pip install pytest pytest-cov requests-mock black isort
  1. Run tests:
pytest
  1. Check code formatting:
black .
isort .

Running Tests

Locally

The project uses pytest for testing. To run the tests locally:

# Run all tests
pytest

# Run with coverage report
pytest --cov=pycalista_ista

# Run specific test file
pytest tests/test_parser.py

GitHub Actions

You can run tests through GitHub Actions in two ways:

  1. Automatic Runs:

    • Tests run automatically on every push to main
    • Tests run on every pull request
    • Results appear in the Actions tab
  2. Manual Runs:

    1. Go to Actions
    2. Click on the "Test" workflow in the left sidebar
    3. Click the "Run workflow" button (blue button, top right)
    4. Select branch to test (default: main)
    5. Optionally enable debug logging for verbose output
    6. Click "Run workflow" green button

The workflow performs:

  • Python 3.12 environment setup
  • Dependency installation
  • Code formatting checks (black, isort)
  • Test execution with coverage
  • Coverage report upload to Codecov

View results:

  • Click on the workflow run in Actions
  • Expand job steps to see details
  • Check Codecov for coverage report
  • Review any test or formatting failures

This is useful for:

  • Verifying changes before PR
  • Testing in clean environment
  • Debugging test issues
  • Generating coverage reports

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Run the tests to ensure they pass
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Interact with the Project

Get the Software

  1. Install from PyPI:
pip install pycalista-ista
  1. Clone the repository:
git clone https://github.com/herruzo99/pycalista-ista.git

Provide Feedback

We welcome your feedback and bug reports!

  1. Bug Reports: Open an issue for any problems you encounter
  2. Feature Requests: Submit an enhancement for new features
  3. Questions: Start a discussion for usage questions

Contribute

We encourage contributions! See our Contributing Guide for:

  • Development setup
  • Code standards
  • Testing requirements
  • Pull request process

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

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

Source Distribution

pycalista_ista-0.3.2.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycalista_ista-0.3.2-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file pycalista_ista-0.3.2.tar.gz.

File metadata

  • Download URL: pycalista_ista-0.3.2.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pycalista_ista-0.3.2.tar.gz
Algorithm Hash digest
SHA256 b635a574425f50a3522282456459531d8782440b33723188ff10b9d2035f8b82
MD5 c60683c3d391c926183eae6ef427bac5
BLAKE2b-256 5fb3b08b264fcb3228feb7a8621485e3ad73fe0984100cf9deea64617cf83ef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycalista_ista-0.3.2.tar.gz:

Publisher: python-publish.yml on herruzo99/pycalista-ista

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycalista_ista-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: pycalista_ista-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pycalista_ista-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3eeea2016aa0fc0a2e9d710b0ab4c56195b85f7941b4ac7d03f0377b1043adfb
MD5 de1beeb42335f54243350f3b5875cfbe
BLAKE2b-256 6bb1301246850fbc1b06abe792bd9e17826dd9ba448071d1901511a81e4e7f7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycalista_ista-0.3.2-py3-none-any.whl:

Publisher: python-publish.yml on herruzo99/pycalista-ista

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page