Python library for the ista calista service
Project description
PyCalista-ista
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
- Clone the repository:
git clone https://github.com/herruzo99/pycalista-ista.git
cd pycalista-ista
- Install development dependencies:
pip install -e ".[dev]"
pip install pytest pytest-cov requests-mock black isort
- Run tests:
pytest
- 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:
-
Automatic Runs:
- Tests run automatically on every push to main
- Tests run on every pull request
- Results appear in the Actions tab
-
Manual Runs:
- Go to Actions
- Click on the "Test" workflow in the left sidebar
- Click the "Run workflow" button (blue button, top right)
- Select branch to test (default: main)
- Optionally enable debug logging for verbose output
- 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Run the tests to ensure they pass
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Interact with the Project
Get the Software
- Install from PyPI:
pip install pycalista-ista
- Clone the repository:
git clone https://github.com/herruzo99/pycalista-ista.git
Provide Feedback
We welcome your feedback and bug reports!
- Bug Reports: Open an issue for any problems you encounter
- Feature Requests: Submit an enhancement for new features
- 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
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 pycalista_ista-0.3.1.tar.gz.
File metadata
- Download URL: pycalista_ista-0.3.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f692e127bccc8dc260771af4ee040470d09415d80910fef116298da0c25a792
|
|
| MD5 |
4603163111d77c0e3490639c8b6788ff
|
|
| BLAKE2b-256 |
cec022f18f8914aa0820a3e245f6823f78b6d00dffcd1fbbdb41b6e8197122ca
|
Provenance
The following attestation bundles were made for pycalista_ista-0.3.1.tar.gz:
Publisher:
python-publish.yml on herruzo99/pycalista-ista
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycalista_ista-0.3.1.tar.gz -
Subject digest:
2f692e127bccc8dc260771af4ee040470d09415d80910fef116298da0c25a792 - Sigstore transparency entry: 185168831
- Sigstore integration time:
-
Permalink:
herruzo99/pycalista-ista@dc4683288cb9d3f8b7f0471d64881074fd9a3df9 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/herruzo99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dc4683288cb9d3f8b7f0471d64881074fd9a3df9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pycalista_ista-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pycalista_ista-0.3.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1960fe7f2377ebe845d19a222c3f20bc1ab27610bfc0f5bf54007f7a254301ab
|
|
| MD5 |
4ae13c65ef1b6e8ac852d98375387617
|
|
| BLAKE2b-256 |
cfbedf7fd49a044b4d07a71c6613833e4b80083aa2b58513736032e964fcb17f
|
Provenance
The following attestation bundles were made for pycalista_ista-0.3.1-py3-none-any.whl:
Publisher:
python-publish.yml on herruzo99/pycalista-ista
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycalista_ista-0.3.1-py3-none-any.whl -
Subject digest:
1960fe7f2377ebe845d19a222c3f20bc1ab27610bfc0f5bf54007f7a254301ab - Sigstore transparency entry: 185168836
- Sigstore integration time:
-
Permalink:
herruzo99/pycalista-ista@dc4683288cb9d3f8b7f0471d64881074fd9a3df9 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/herruzo99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dc4683288cb9d3f8b7f0471d64881074fd9a3df9 -
Trigger Event:
release
-
Statement type: