Hydro-Quebec-API-Wrapper 3.2.0__tar.gz → 4.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hydro_quebec_api_wrapper-4.1.0/.devcontainer/Dockerfile +11 -0
- hydro_quebec_api_wrapper-4.1.0/.devcontainer/devcontainer.json +20 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/.gitlab-ci.yml +5 -5
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/.pre-commit-config.yaml +12 -11
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/Hydro_Quebec_API_Wrapper.egg-info/PKG-INFO +7 -6
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/Hydro_Quebec_API_Wrapper.egg-info/SOURCES.txt +5 -0
- hydro_quebec_api_wrapper-4.1.0/Hydro_Quebec_API_Wrapper.egg-info/requires.txt +5 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/PKG-INFO +7 -6
- hydro_quebec_api_wrapper-4.1.0/conflict_test_requirements.txt +1 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/account.py +1 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/common.py +25 -19
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_d.py +5 -4
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_d_cpc.py +8 -7
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_dpc.py +9 -8
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_dt.py +5 -4
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_m.py +15 -14
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_m_gdp.py +5 -4
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_residential.py +10 -9
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/customer.py +9 -8
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/diagnostic.py +48 -5
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/hydro_api/client.py +66 -10
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/hydro_api/consts.py +6 -0
- hydro_quebec_api_wrapper-4.1.0/hydroqc/peak/basepeak.py +67 -0
- hydro_quebec_api_wrapper-3.2.0/hydroqc/peak/dpc/handler.py → hydro_quebec_api_wrapper-4.1.0/hydroqc/peak/basepeakhandler.py +114 -107
- hydro_quebec_api_wrapper-4.1.0/hydroqc/peak/consts.py +3 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/cpc/consts.py +5 -3
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/cpc/handler.py +75 -178
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/cpc/peak.py +30 -84
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/dpc/consts.py +1 -4
- hydro_quebec_api_wrapper-4.1.0/hydroqc/peak/dpc/handler.py +109 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/dpc/peak.py +7 -21
- hydro_quebec_api_wrapper-4.1.0/hydroqc/public_client.py +88 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/__init__.py +8 -1
- hydro_quebec_api_wrapper-4.1.0/hydroqc/types/common.py +80 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/webuser.py +12 -8
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/pyproject.toml +7 -4
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/setup.cfg +3 -3
- hydro_quebec_api_wrapper-4.1.0/test_requirements.txt +14 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/subtest_common.py +24 -47
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/subtest_contract_d.py +1 -1
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/subtest_contract_d_cpc.py +19 -1
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/subtest_contract_dpc.py +10 -4
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/subtest_contract_dt.py +1 -1
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/subtest_contract_m.py +1 -1
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/subtest_contract_m_gdp.py +1 -1
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/test_timerange.py +13 -5
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/tools.py +2 -2
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tox.ini +1 -1
- hydro_quebec_api_wrapper-3.2.0/.devcontainer/devcontainer.json +0 -10
- hydro_quebec_api_wrapper-3.2.0/Hydro_Quebec_API_Wrapper.egg-info/requires.txt +0 -5
- hydro_quebec_api_wrapper-3.2.0/conflict_test_requirements.txt +0 -1
- hydro_quebec_api_wrapper-3.2.0/hydroqc/types/common.py +0 -49
- hydro_quebec_api_wrapper-3.2.0/test_requirements.txt +0 -14
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/.coveragerc +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/.flake8 +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/.gitignore +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/.pylintrc +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/Hydro_Quebec_API_Wrapper.egg-info/dependency_links.txt +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/Hydro_Quebec_API_Wrapper.egg-info/entry_points.txt +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/Hydro_Quebec_API_Wrapper.egg-info/top_level.txt +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/LICENSE +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/MANIFEST.in +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/README.md +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/config.default.yaml +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/Makefile +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/make.bat +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/_static/custom.css +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/_static/hydroqc-logo-128.png +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/_static/hydroqc-logo.svg +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/conf.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/external/description-des-codes-interruption.pdf +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/index.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/hydroqc.contract.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/hydroqc.hydro_api.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/hydroqc.peak.cpc.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/hydroqc.peak.dpc.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/hydroqc.peak.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/hydroqc.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/hydroqc.types.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/reference/modules.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/docs/source/todo.rst +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/examples/hydro.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/__init__.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/consts.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/__init__.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/outage.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/error.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/hydro_api/__init__.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/hydro_api/cache.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/logger.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/__init__.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/cpc/__init__.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/peak/dpc/__init__.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/py.typed +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/timerange.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/account.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/consump.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/contract.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/cpc.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/dpc.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/dt.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/types/outage.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/utils.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/logo/hydroqc-logo-128.png +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/logo/hydroqc-logo.svg +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/renovate.json5 +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/__init__.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/conftest.py +0 -0
- {hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/tests/test_basic.py +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
FROM registry.gitlab.com/hydroqc/hydroqc-base-container/3.13:latest
|
|
2
|
+
|
|
3
|
+
# Create devcontainer user with home directory and bash shell, install sudo, and configure passwordless sudo
|
|
4
|
+
RUN useradd -m -s /bin/bash devcontainer \
|
|
5
|
+
&& apt-get update && apt-get install -y sudo gnulib locales \
|
|
6
|
+
&& echo "devcontainer ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/devcontainer
|
|
7
|
+
|
|
8
|
+
WORKDIR /home/devcontainer
|
|
9
|
+
USER devcontainer
|
|
10
|
+
RUN mkdir -p /home/devcontainer/.local/bin \
|
|
11
|
+
&& export PATH=$PATH:/home/devcontainer/.local/bin
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hydroqc",
|
|
3
|
+
"build": {
|
|
4
|
+
"dockerfile": "Dockerfile"
|
|
5
|
+
},
|
|
6
|
+
"features": {
|
|
7
|
+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
|
|
8
|
+
"ghcr.io/msclock/features/gitlab-ci-local:0": {
|
|
9
|
+
"version": "latest"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"customizations": {
|
|
13
|
+
"vscode": {
|
|
14
|
+
"extensions": [
|
|
15
|
+
"GitLab.gitlab-workflow"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"remoteUser": "devcontainer"
|
|
20
|
+
}
|
|
@@ -31,7 +31,7 @@ test:
|
|
|
31
31
|
stage: test
|
|
32
32
|
tags:
|
|
33
33
|
- hydroqc
|
|
34
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.
|
|
34
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.13:latest
|
|
35
35
|
script:
|
|
36
36
|
- tox -e pylint,flake8,pydocstyle,typing,black,deps-conflict --parallel auto
|
|
37
37
|
- cat mypy-txt-report/index.txt
|
|
@@ -70,7 +70,7 @@ test:
|
|
|
70
70
|
# Run on shared runners to lighten the load on the private runners
|
|
71
71
|
# tags:
|
|
72
72
|
# - hydroqc
|
|
73
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.
|
|
73
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.13:latest
|
|
74
74
|
script:
|
|
75
75
|
- >
|
|
76
76
|
OUTPUT=$(curl
|
|
@@ -257,7 +257,7 @@ private_tests_done:
|
|
|
257
257
|
stage: private_tests_done
|
|
258
258
|
tags:
|
|
259
259
|
- hydroqc
|
|
260
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.
|
|
260
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.13:latest
|
|
261
261
|
script:
|
|
262
262
|
#- apt-get update && apt-get install --no-install-recommends -y python3.10 python3-venv python3-pip --no-install-recommends git
|
|
263
263
|
- echo "Private Tests done"
|
|
@@ -299,7 +299,7 @@ package:
|
|
|
299
299
|
stage: test
|
|
300
300
|
tags:
|
|
301
301
|
- hydroqc
|
|
302
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.
|
|
302
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.13:latest
|
|
303
303
|
script:
|
|
304
304
|
# Build a package with a version based on the commmit short sha
|
|
305
305
|
- pip install --upgrade pip
|
|
@@ -329,7 +329,7 @@ promote2pypi:
|
|
|
329
329
|
stage: pypi
|
|
330
330
|
tags:
|
|
331
331
|
- hydroqc
|
|
332
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.
|
|
332
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.13:latest
|
|
333
333
|
script:
|
|
334
334
|
# TODO: try to pull the good package from gitlab pypi repo
|
|
335
335
|
# then change the version (promote)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
repos:
|
|
2
2
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
-
rev:
|
|
3
|
+
rev: v6.0.0
|
|
4
4
|
hooks:
|
|
5
5
|
- id: trailing-whitespace
|
|
6
6
|
- id: end-of-file-fixer
|
|
@@ -16,39 +16,40 @@ repos:
|
|
|
16
16
|
- id: check-ast
|
|
17
17
|
|
|
18
18
|
- repo: https://github.com/psf/black
|
|
19
|
-
rev:
|
|
19
|
+
rev: 25.9.0
|
|
20
20
|
hooks:
|
|
21
21
|
- id: black
|
|
22
22
|
language_version: python3
|
|
23
23
|
|
|
24
24
|
- repo: https://github.com/PyCQA/flake8/
|
|
25
|
-
rev: 7.
|
|
25
|
+
rev: 7.3.0
|
|
26
26
|
hooks:
|
|
27
27
|
- id: flake8
|
|
28
28
|
additional_dependencies: [flake8-docstrings]
|
|
29
29
|
|
|
30
30
|
- repo: https://github.com/PyCQA/isort
|
|
31
|
-
rev:
|
|
31
|
+
rev: 7.0.0
|
|
32
32
|
hooks:
|
|
33
33
|
- id: isort
|
|
34
34
|
args: ["--profile", "black", "--filter-files"]
|
|
35
35
|
# additional_dependencies: [toml]
|
|
36
36
|
|
|
37
37
|
- repo: https://github.com/PyCQA/doc8
|
|
38
|
-
rev:
|
|
38
|
+
rev: v2.0.0
|
|
39
39
|
hooks:
|
|
40
40
|
- id: doc8
|
|
41
41
|
|
|
42
42
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
43
|
-
rev: v1.
|
|
43
|
+
rev: v1.18.2
|
|
44
44
|
hooks:
|
|
45
45
|
- id: mypy
|
|
46
46
|
args: [--strict, --pretty, --show-error-codes]
|
|
47
47
|
additional_dependencies:
|
|
48
|
-
- "types-pytz==
|
|
49
|
-
- "types-PyYAML==6.0.12.
|
|
50
|
-
- "types-python-dateutil==2.9.0.
|
|
48
|
+
- "types-pytz==2025.2.0.20251108"
|
|
49
|
+
- "types-PyYAML==6.0.12.20250915"
|
|
50
|
+
- "types-python-dateutil==2.9.0.20251108"
|
|
51
51
|
- "pytest-stub==1.1.0"
|
|
52
|
-
- "aiohttp==3.
|
|
53
|
-
- "aiocache==0.12.
|
|
52
|
+
- "aiohttp==3.13.2"
|
|
53
|
+
- "aiocache==0.12.3"
|
|
54
54
|
- "pkce==1.0.3"
|
|
55
|
+
- "pytest-asyncio==1.2.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: Hydro-Quebec-API-Wrapper
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: A wrapper library to access hydro quebec API and more
|
|
5
5
|
Home-page: https://hydroqc.ca
|
|
6
6
|
Author-email: Hydroqc Team <info@hydroqc.ca>
|
|
@@ -12,14 +12,15 @@ Keywords: hydroquebec,lib
|
|
|
12
12
|
Platform: any
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
|
-
Requires-Python: >=3.
|
|
15
|
+
Requires-Python: >=3.13.0
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: aiohttp==3.
|
|
18
|
+
Requires-Dist: aiohttp==3.13.2
|
|
19
19
|
Requires-Dist: python-dateutil==2.9.0.post0
|
|
20
|
-
Requires-Dist: pytz==
|
|
21
|
-
Requires-Dist: aiocache==0.12.
|
|
20
|
+
Requires-Dist: pytz==2025.2
|
|
21
|
+
Requires-Dist: aiocache==0.12.3
|
|
22
22
|
Requires-Dist: pkce==1.0.3
|
|
23
|
+
Dynamic: license-file
|
|
23
24
|
|
|
24
25
|
# HydroQC - Hydro Quebec API wrapper
|
|
25
26
|
|
|
@@ -14,6 +14,7 @@ renovate.json5
|
|
|
14
14
|
setup.cfg
|
|
15
15
|
test_requirements.txt
|
|
16
16
|
tox.ini
|
|
17
|
+
.devcontainer/Dockerfile
|
|
17
18
|
.devcontainer/devcontainer.json
|
|
18
19
|
Hydro_Quebec_API_Wrapper.egg-info/PKG-INFO
|
|
19
20
|
Hydro_Quebec_API_Wrapper.egg-info/SOURCES.txt
|
|
@@ -46,6 +47,7 @@ hydroqc/customer.py
|
|
|
46
47
|
hydroqc/diagnostic.py
|
|
47
48
|
hydroqc/error.py
|
|
48
49
|
hydroqc/logger.py
|
|
50
|
+
hydroqc/public_client.py
|
|
49
51
|
hydroqc/py.typed
|
|
50
52
|
hydroqc/timerange.py
|
|
51
53
|
hydroqc/utils.py
|
|
@@ -65,6 +67,9 @@ hydroqc/hydro_api/cache.py
|
|
|
65
67
|
hydroqc/hydro_api/client.py
|
|
66
68
|
hydroqc/hydro_api/consts.py
|
|
67
69
|
hydroqc/peak/__init__.py
|
|
70
|
+
hydroqc/peak/basepeak.py
|
|
71
|
+
hydroqc/peak/basepeakhandler.py
|
|
72
|
+
hydroqc/peak/consts.py
|
|
68
73
|
hydroqc/peak/cpc/__init__.py
|
|
69
74
|
hydroqc/peak/cpc/consts.py
|
|
70
75
|
hydroqc/peak/cpc/handler.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: Hydro-Quebec-API-Wrapper
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: A wrapper library to access hydro quebec API and more
|
|
5
5
|
Home-page: https://hydroqc.ca
|
|
6
6
|
Author-email: Hydroqc Team <info@hydroqc.ca>
|
|
@@ -12,14 +12,15 @@ Keywords: hydroquebec,lib
|
|
|
12
12
|
Platform: any
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
|
-
Requires-Python: >=3.
|
|
15
|
+
Requires-Python: >=3.13.0
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: aiohttp==3.
|
|
18
|
+
Requires-Dist: aiohttp==3.13.2
|
|
19
19
|
Requires-Dist: python-dateutil==2.9.0.post0
|
|
20
|
-
Requires-Dist: pytz==
|
|
21
|
-
Requires-Dist: aiocache==0.12.
|
|
20
|
+
Requires-Dist: pytz==2025.2
|
|
21
|
+
Requires-Dist: aiocache==0.12.3
|
|
22
22
|
Requires-Dist: pkce==1.0.3
|
|
23
|
+
Dynamic: license-file
|
|
23
24
|
|
|
24
25
|
# HydroQC - Hydro Quebec API wrapper
|
|
25
26
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mqtt-hass-base==4.4.1
|
{hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/common.py
RENAMED
|
@@ -27,7 +27,7 @@ P = ParamSpec("P")
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
def check_period_data_present(
|
|
30
|
-
method: Callable[..., None | str | bool | float | PeriodDataTyping]
|
|
30
|
+
method: Callable[..., None | str | bool | float | PeriodDataTyping],
|
|
31
31
|
) -> Callable[..., None | str | bool | float | PeriodDataTyping]:
|
|
32
32
|
"""Check if contract's data are present."""
|
|
33
33
|
|
|
@@ -47,7 +47,7 @@ def check_period_data_present(
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
def check_info_data_present(
|
|
50
|
-
method: Callable[..., None | str | bool | float | date]
|
|
50
|
+
method: Callable[..., None | str | bool | float | date],
|
|
51
51
|
) -> Callable[..., None | str | bool | float | date]:
|
|
52
52
|
"""Check if contract's data are present."""
|
|
53
53
|
|
|
@@ -67,7 +67,7 @@ def check_info_data_present(
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
def check_annual_data_present(
|
|
70
|
-
method: Callable[..., None | str | bool | float | date]
|
|
70
|
+
method: Callable[..., None | str | bool | float | date],
|
|
71
71
|
) -> Callable[..., None | str | bool | float | date]:
|
|
72
72
|
"""Check if contract's data are present."""
|
|
73
73
|
|
|
@@ -124,6 +124,7 @@ class Contract(ABC):
|
|
|
124
124
|
self,
|
|
125
125
|
applicant_id: str,
|
|
126
126
|
customer_id: str,
|
|
127
|
+
*,
|
|
127
128
|
account_id: str,
|
|
128
129
|
contract_id: str,
|
|
129
130
|
hydro_client: HydroClient,
|
|
@@ -273,7 +274,11 @@ class Contract(ABC):
|
|
|
273
274
|
) -> ConsumpDailyTyping:
|
|
274
275
|
"""Fetch daily consumption."""
|
|
275
276
|
return await self._hydro_client.get_daily_consumption(
|
|
276
|
-
self.applicant_id,
|
|
277
|
+
self.applicant_id,
|
|
278
|
+
self.customer_id,
|
|
279
|
+
contract_id=self.contract_id,
|
|
280
|
+
start_date=start_date,
|
|
281
|
+
end_date=end_date,
|
|
277
282
|
)
|
|
278
283
|
|
|
279
284
|
async def get_today_daily_consumption(self) -> ConsumpDailyTyping:
|
|
@@ -313,11 +318,11 @@ class Contract(ABC):
|
|
|
313
318
|
data_csv = await self._hydro_client.get_consumption_csv(
|
|
314
319
|
self.applicant_id,
|
|
315
320
|
self.customer_id,
|
|
316
|
-
self.contract_id,
|
|
317
|
-
start_date,
|
|
318
|
-
end_date,
|
|
319
|
-
"energie-jour",
|
|
320
|
-
raw_output,
|
|
321
|
+
contract_id=self.contract_id,
|
|
322
|
+
start_date=start_date,
|
|
323
|
+
end_date=end_date,
|
|
324
|
+
option="energie-jour",
|
|
325
|
+
raw_output=raw_output,
|
|
321
326
|
)
|
|
322
327
|
return data_csv
|
|
323
328
|
|
|
@@ -334,11 +339,11 @@ class Contract(ABC):
|
|
|
334
339
|
data_csv = await self._hydro_client.get_consumption_csv(
|
|
335
340
|
self.applicant_id,
|
|
336
341
|
self.customer_id,
|
|
337
|
-
self.contract_id,
|
|
338
|
-
start_date,
|
|
339
|
-
end_date,
|
|
340
|
-
"energie-heure",
|
|
341
|
-
raw_output,
|
|
342
|
+
contract_id=self.contract_id,
|
|
343
|
+
start_date=start_date,
|
|
344
|
+
end_date=end_date,
|
|
345
|
+
option="energie-heure",
|
|
346
|
+
raw_output=raw_output,
|
|
342
347
|
)
|
|
343
348
|
return data_csv
|
|
344
349
|
|
|
@@ -379,7 +384,7 @@ class Contract(ABC):
|
|
|
379
384
|
@check_period_data_present
|
|
380
385
|
def cp_projected_bill(self) -> float:
|
|
381
386
|
"""Projected bill of the current period."""
|
|
382
|
-
return self._all_period_data[0]["montantProjetePeriode"]
|
|
387
|
+
return float(self._all_period_data[0]["montantProjetePeriode"])
|
|
383
388
|
|
|
384
389
|
@property
|
|
385
390
|
@check_period_data_present
|
|
@@ -453,6 +458,7 @@ class ContractFallBack(Contract):
|
|
|
453
458
|
self,
|
|
454
459
|
applicant_id: str,
|
|
455
460
|
customer_id: str,
|
|
461
|
+
*,
|
|
456
462
|
account_id: str,
|
|
457
463
|
contract_id: str,
|
|
458
464
|
hydro_client: HydroClient,
|
|
@@ -463,8 +469,8 @@ class ContractFallBack(Contract):
|
|
|
463
469
|
self,
|
|
464
470
|
applicant_id,
|
|
465
471
|
customer_id,
|
|
466
|
-
account_id,
|
|
467
|
-
contract_id,
|
|
468
|
-
hydro_client,
|
|
469
|
-
log_level,
|
|
472
|
+
account_id=account_id,
|
|
473
|
+
contract_id=contract_id,
|
|
474
|
+
hydro_client=hydro_client,
|
|
475
|
+
log_level=log_level,
|
|
470
476
|
)
|
{hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_d.py
RENAMED
|
@@ -17,6 +17,7 @@ class ContractD(ContractResidential):
|
|
|
17
17
|
self,
|
|
18
18
|
applicant_id: str,
|
|
19
19
|
customer_id: str,
|
|
20
|
+
*,
|
|
20
21
|
account_id: str,
|
|
21
22
|
contract_id: str,
|
|
22
23
|
hydro_client: HydroClient,
|
|
@@ -27,8 +28,8 @@ class ContractD(ContractResidential):
|
|
|
27
28
|
self,
|
|
28
29
|
applicant_id,
|
|
29
30
|
customer_id,
|
|
30
|
-
account_id,
|
|
31
|
-
contract_id,
|
|
32
|
-
hydro_client,
|
|
33
|
-
log_level,
|
|
31
|
+
account_id=account_id,
|
|
32
|
+
contract_id=contract_id,
|
|
33
|
+
hydro_client=hydro_client,
|
|
34
|
+
log_level=log_level,
|
|
34
35
|
)
|
{hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_d_cpc.py
RENAMED
|
@@ -17,6 +17,7 @@ class ContractDCPC(ContractD):
|
|
|
17
17
|
self,
|
|
18
18
|
applicant_id: str,
|
|
19
19
|
customer_id: str,
|
|
20
|
+
*,
|
|
20
21
|
account_id: str,
|
|
21
22
|
contract_id: str,
|
|
22
23
|
hydro_client: HydroClient,
|
|
@@ -27,18 +28,18 @@ class ContractDCPC(ContractD):
|
|
|
27
28
|
self,
|
|
28
29
|
applicant_id,
|
|
29
30
|
customer_id,
|
|
30
|
-
account_id,
|
|
31
|
-
contract_id,
|
|
32
|
-
hydro_client,
|
|
33
|
-
log_level,
|
|
31
|
+
account_id=account_id,
|
|
32
|
+
contract_id=contract_id,
|
|
33
|
+
hydro_client=hydro_client,
|
|
34
|
+
log_level=log_level,
|
|
34
35
|
)
|
|
35
36
|
wch_logger = self._logger.getChild("wch")
|
|
36
37
|
self._wch: CPCPeakHandler = CPCPeakHandler(
|
|
37
38
|
self.applicant_id,
|
|
38
39
|
self.customer_id,
|
|
39
|
-
self.contract_id,
|
|
40
|
-
hydro_client,
|
|
41
|
-
wch_logger,
|
|
40
|
+
contract_id=self.contract_id,
|
|
41
|
+
hydro_client=hydro_client,
|
|
42
|
+
logger=wch_logger,
|
|
42
43
|
)
|
|
43
44
|
|
|
44
45
|
@property
|
{hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_dpc.py
RENAMED
|
@@ -11,7 +11,7 @@ from hydroqc.types import DPCDataTyping
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def check_dpc_data_present(
|
|
14
|
-
method: Callable[..., None | str | bool | float | date]
|
|
14
|
+
method: Callable[..., None | str | bool | float | date],
|
|
15
15
|
) -> Callable[..., None | str | bool | float | date]:
|
|
16
16
|
"""Check if contractDPC's data are present."""
|
|
17
17
|
|
|
@@ -45,6 +45,7 @@ class ContractDPC(ContractResidential):
|
|
|
45
45
|
self,
|
|
46
46
|
applicant_id: str,
|
|
47
47
|
customer_id: str,
|
|
48
|
+
*,
|
|
48
49
|
account_id: str,
|
|
49
50
|
contract_id: str,
|
|
50
51
|
hydro_client: HydroClient,
|
|
@@ -55,18 +56,18 @@ class ContractDPC(ContractResidential):
|
|
|
55
56
|
self,
|
|
56
57
|
applicant_id,
|
|
57
58
|
customer_id,
|
|
58
|
-
account_id,
|
|
59
|
-
contract_id,
|
|
60
|
-
hydro_client,
|
|
61
|
-
log_level,
|
|
59
|
+
account_id=account_id,
|
|
60
|
+
contract_id=contract_id,
|
|
61
|
+
hydro_client=hydro_client,
|
|
62
|
+
log_level=log_level,
|
|
62
63
|
)
|
|
63
64
|
peaks_logger = self._logger.getChild("peaks")
|
|
64
65
|
self._peakh: DPCPeakHandler = DPCPeakHandler(
|
|
65
66
|
self.applicant_id,
|
|
66
67
|
self.customer_id,
|
|
67
|
-
self.contract_id,
|
|
68
|
-
hydro_client,
|
|
69
|
-
peaks_logger,
|
|
68
|
+
contract_id=self.contract_id,
|
|
69
|
+
hydro_client=hydro_client,
|
|
70
|
+
logger=peaks_logger,
|
|
70
71
|
)
|
|
71
72
|
|
|
72
73
|
@property
|
{hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_dt.py
RENAMED
|
@@ -18,6 +18,7 @@ class ContractDT(ContractResidential):
|
|
|
18
18
|
self,
|
|
19
19
|
applicant_id: str,
|
|
20
20
|
customer_id: str,
|
|
21
|
+
*,
|
|
21
22
|
account_id: str,
|
|
22
23
|
contract_id: str,
|
|
23
24
|
hydro_client: HydroClient,
|
|
@@ -28,10 +29,10 @@ class ContractDT(ContractResidential):
|
|
|
28
29
|
self,
|
|
29
30
|
applicant_id,
|
|
30
31
|
customer_id,
|
|
31
|
-
account_id,
|
|
32
|
-
contract_id,
|
|
33
|
-
hydro_client,
|
|
34
|
-
log_level,
|
|
32
|
+
account_id=account_id,
|
|
33
|
+
contract_id=contract_id,
|
|
34
|
+
hydro_client=hydro_client,
|
|
35
|
+
log_level=log_level,
|
|
35
36
|
)
|
|
36
37
|
|
|
37
38
|
@property
|
{hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_m.py
RENAMED
|
@@ -21,6 +21,7 @@ class ContractM(Contract):
|
|
|
21
21
|
self,
|
|
22
22
|
applicant_id: str,
|
|
23
23
|
customer_id: str,
|
|
24
|
+
*,
|
|
24
25
|
account_id: str,
|
|
25
26
|
contract_id: str,
|
|
26
27
|
hydro_client: HydroClient,
|
|
@@ -31,10 +32,10 @@ class ContractM(Contract):
|
|
|
31
32
|
self,
|
|
32
33
|
applicant_id,
|
|
33
34
|
customer_id,
|
|
34
|
-
account_id,
|
|
35
|
-
contract_id,
|
|
36
|
-
hydro_client,
|
|
37
|
-
log_level,
|
|
35
|
+
account_id=account_id,
|
|
36
|
+
contract_id=contract_id,
|
|
37
|
+
hydro_client=hydro_client,
|
|
38
|
+
log_level=log_level,
|
|
38
39
|
)
|
|
39
40
|
|
|
40
41
|
async def get_power_demand_per_15min(
|
|
@@ -47,11 +48,11 @@ class ContractM(Contract):
|
|
|
47
48
|
data_csv = await self._hydro_client.get_consumption_csv(
|
|
48
49
|
self.applicant_id,
|
|
49
50
|
self.customer_id,
|
|
50
|
-
self.contract_id,
|
|
51
|
-
start_date,
|
|
52
|
-
end_date,
|
|
53
|
-
"puissance-min",
|
|
54
|
-
raw_output,
|
|
51
|
+
contract_id=self.contract_id,
|
|
52
|
+
start_date=start_date,
|
|
53
|
+
end_date=end_date,
|
|
54
|
+
option="puissance-min",
|
|
55
|
+
raw_output=raw_output,
|
|
55
56
|
)
|
|
56
57
|
return data_csv
|
|
57
58
|
|
|
@@ -65,10 +66,10 @@ class ContractM(Contract):
|
|
|
65
66
|
data_csv = await self._hydro_client.get_consumption_csv(
|
|
66
67
|
self.applicant_id,
|
|
67
68
|
self.customer_id,
|
|
68
|
-
self.contract_id,
|
|
69
|
-
start_date,
|
|
70
|
-
end_date,
|
|
71
|
-
"puissance-jour",
|
|
72
|
-
raw_output,
|
|
69
|
+
contract_id=self.contract_id,
|
|
70
|
+
start_date=start_date,
|
|
71
|
+
end_date=end_date,
|
|
72
|
+
option="puissance-jour",
|
|
73
|
+
raw_output=raw_output,
|
|
73
74
|
)
|
|
74
75
|
return data_csv
|
{hydro_quebec_api_wrapper-3.2.0 → hydro_quebec_api_wrapper-4.1.0}/hydroqc/contract/contract_m_gdp.py
RENAMED
|
@@ -16,6 +16,7 @@ class ContractMGDP(ContractM):
|
|
|
16
16
|
self,
|
|
17
17
|
applicant_id: str,
|
|
18
18
|
customer_id: str,
|
|
19
|
+
*,
|
|
19
20
|
account_id: str,
|
|
20
21
|
contract_id: str,
|
|
21
22
|
hydro_client: HydroClient,
|
|
@@ -26,8 +27,8 @@ class ContractMGDP(ContractM):
|
|
|
26
27
|
self,
|
|
27
28
|
applicant_id,
|
|
28
29
|
customer_id,
|
|
29
|
-
account_id,
|
|
30
|
-
contract_id,
|
|
31
|
-
hydro_client,
|
|
32
|
-
log_level,
|
|
30
|
+
account_id=account_id,
|
|
31
|
+
contract_id=contract_id,
|
|
32
|
+
hydro_client=hydro_client,
|
|
33
|
+
log_level=log_level,
|
|
33
34
|
)
|
|
@@ -18,6 +18,7 @@ class ContractResidential(Contract):
|
|
|
18
18
|
self,
|
|
19
19
|
applicant_id: str,
|
|
20
20
|
customer_id: str,
|
|
21
|
+
*,
|
|
21
22
|
account_id: str,
|
|
22
23
|
contract_id: str,
|
|
23
24
|
hydro_client: HydroClient,
|
|
@@ -28,10 +29,10 @@ class ContractResidential(Contract):
|
|
|
28
29
|
self,
|
|
29
30
|
applicant_id,
|
|
30
31
|
customer_id,
|
|
31
|
-
account_id,
|
|
32
|
-
contract_id,
|
|
33
|
-
hydro_client,
|
|
34
|
-
log_level,
|
|
32
|
+
account_id=account_id,
|
|
33
|
+
contract_id=contract_id,
|
|
34
|
+
hydro_client=hydro_client,
|
|
35
|
+
log_level=log_level,
|
|
35
36
|
)
|
|
36
37
|
|
|
37
38
|
async def get_daily_energy(
|
|
@@ -44,10 +45,10 @@ class ContractResidential(Contract):
|
|
|
44
45
|
data_csv = await self._hydro_client.get_consumption_csv(
|
|
45
46
|
self.applicant_id,
|
|
46
47
|
self.customer_id,
|
|
47
|
-
self.contract_id,
|
|
48
|
-
start_date,
|
|
49
|
-
end_date,
|
|
50
|
-
"energie-jour",
|
|
51
|
-
raw_output,
|
|
48
|
+
contract_id=self.contract_id,
|
|
49
|
+
start_date=start_date,
|
|
50
|
+
end_date=end_date,
|
|
51
|
+
option="energie-jour",
|
|
52
|
+
raw_output=raw_output,
|
|
52
53
|
)
|
|
53
54
|
return data_csv
|
|
@@ -19,6 +19,7 @@ class Customer:
|
|
|
19
19
|
self,
|
|
20
20
|
applicant_id: str,
|
|
21
21
|
customer_id: str,
|
|
22
|
+
*,
|
|
22
23
|
customer_names: list[str],
|
|
23
24
|
hydro_client: HydroClient,
|
|
24
25
|
log_level: str | None = None,
|
|
@@ -71,10 +72,10 @@ class Customer:
|
|
|
71
72
|
account = Account(
|
|
72
73
|
self.applicant_id,
|
|
73
74
|
self.customer_id,
|
|
74
|
-
account_id,
|
|
75
|
-
[],
|
|
76
|
-
self._hydro_client,
|
|
77
|
-
self._log_level,
|
|
75
|
+
account_id=account_id,
|
|
76
|
+
contracts=[],
|
|
77
|
+
hydro_client=self._hydro_client,
|
|
78
|
+
log_level=self._log_level,
|
|
78
79
|
)
|
|
79
80
|
self.accounts.append(account)
|
|
80
81
|
else:
|
|
@@ -103,10 +104,10 @@ class Customer:
|
|
|
103
104
|
contract = getattr(contractModule, contract_class_name)(
|
|
104
105
|
self.applicant_id,
|
|
105
106
|
self.customer_id,
|
|
106
|
-
account_id,
|
|
107
|
-
contract_id,
|
|
108
|
-
self._hydro_client,
|
|
109
|
-
self._log_level,
|
|
107
|
+
account_id=account_id,
|
|
108
|
+
contract_id=contract_id,
|
|
109
|
+
hydro_client=self._hydro_client,
|
|
110
|
+
log_level=self._log_level,
|
|
110
111
|
)
|
|
111
112
|
account.contracts.append(contract)
|
|
112
113
|
else:
|