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.0.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.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycalista_ista-0.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 619f0ae841922d480e5b4df22955b8c82059462ce545fe40266877a9b7a9e68e
MD5 ca688373ed33323585cf6f2fac6834a3
BLAKE2b-256 5997db63b0b0c59d6a3510d7415173e24a18fec9a06ca3dbc2e664d34830fd75

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycalista_ista-0.3.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: pycalista_ista-0.3.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f3b8fa222ec8546e672c84f1f3f81a600946d64dc1e94af517ec151f0c2d632
MD5 30cd233a84745e462894ab7b0f7ccec2
BLAKE2b-256 4e15ebae905a4b02f488e9c943d640ecc577e6fa6a8156205f210f235749f3dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycalista_ista-0.3.0-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