shapeshifter-uftp 2.2.0__tar.gz → 2.3.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.
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/PKG-INFO +3 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/pyproject.toml +13 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/__init__.py +145 -144
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/agr_cro_client.py +9 -5
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/agr_dso_client.py +17 -17
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/base_client.py +25 -30
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/cro_agr_client.py +7 -7
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/cro_dso_client.py +7 -7
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/dso_agr_client.py +19 -19
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/dso_cro_client.py +7 -7
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/service/agr_service.py +6 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/service/base_service.py +29 -9
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/service/cro_service.py +6 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/service/dso_service.py +6 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/transport.py +4 -4
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/__init__.py +115 -115
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/agr_portfolio_query.py +1 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/agr_portfolio_update.py +1 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/d_prognosis.py +2 -6
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/dso_portfolio_query.py +1 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/dso_portfolio_update.py +1 -2
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/flex_message.py +1 -2
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/flex_offer.py +1 -5
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/flex_offer_revocation.py +0 -7
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/flex_order.py +1 -5
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/flex_request.py +1 -4
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/flex_reservation_update.py +2 -6
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/flex_settlement.py +3 -5
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/metering.py +0 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/payload_message.py +1 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/signed_message.py +0 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/test_message.py +1 -8
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp.egg-info/PKG-INFO +3 -3
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp.egg-info/SOURCES.txt +0 -4
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp.egg-info/requires.txt +2 -2
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_cli.py +1 -2
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_client_errors.py +0 -5
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_communications.py +72 -53
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_default_responses.py +1 -1
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_message_destination.py +6 -5
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_oauth.py +0 -1
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_presence_of_client_methods.py +4 -2
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_roundtrip_serialization.py +3 -1
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_service_errors.py +2 -7
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_snake_case.py +1 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_ttl_cache.py +1 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_validations.py +1 -1
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_xml_schema_compliance.py +4 -1
- shapeshifter_uftp-2.2.0/shapeshifter_uftp/uftp/agr_cro.py +0 -14
- shapeshifter_uftp-2.2.0/shapeshifter_uftp/uftp/agr_dso.py +0 -32
- shapeshifter_uftp-2.2.0/shapeshifter_uftp/uftp/common.py +0 -6
- shapeshifter_uftp-2.2.0/shapeshifter_uftp/uftp/cro_dso.py +0 -11
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/README.rst +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/setup.cfg +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/cli.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/__init__.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/exceptions.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/logging.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/oauth.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/service/__init__.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/defaults.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/enums.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/messages/__init__.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/uftp/validations.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp.egg-info/dependency_links.txt +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp.egg-info/entry_points.txt +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp.egg-info/top_level.txt +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_client_with_workers.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_clients_from_service.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_presence_of_service_methods.py +0 -0
- {shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/test/test_seal_and_unseal.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shapeshifter_uftp
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Implementation of the Shapeshifter (UFTP) protocol
|
|
5
5
|
Project-URL: Repository, https://github.com/shapeshifter/shapeshifter-library-python
|
|
6
6
|
Project-URL: Documentation, https://github.com/shapeshifter/shapeshifter-library-python/README.md
|
|
@@ -9,8 +9,8 @@ Project-URL: Changelog, https://github.com/shapeshifter/shapeshifter-library-pyt
|
|
|
9
9
|
Requires-Python: <3.15,>=3.11
|
|
10
10
|
Description-Content-Type: text/x-rst
|
|
11
11
|
Requires-Dist: xsdata[lxml]<27.0,>=25.0
|
|
12
|
-
Requires-Dist: pynacl==1.
|
|
13
|
-
Requires-Dist: dnspython==2.
|
|
12
|
+
Requires-Dist: pynacl==1.6.2
|
|
13
|
+
Requires-Dist: dnspython==2.8.0
|
|
14
14
|
Requires-Dist: fastapi<0.128,>=0.110
|
|
15
15
|
Requires-Dist: fastapi-xml<2.0.0,>=1.1.1
|
|
16
16
|
Requires-Dist: requests
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "shapeshifter_uftp"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.3.0"
|
|
4
4
|
description = "Implementation of the Shapeshifter (UFTP) protocol"
|
|
5
5
|
dependencies = [
|
|
6
6
|
"xsdata[lxml]>=25.0,<27.0",
|
|
7
|
-
"pynacl==1.
|
|
8
|
-
"dnspython==2.
|
|
7
|
+
"pynacl==1.6.2",
|
|
8
|
+
"dnspython==2.8.0",
|
|
9
9
|
"fastapi>=0.110,<0.128",
|
|
10
10
|
"fastapi-xml>=1.1.1,<2.0.0",
|
|
11
11
|
"requests",
|
|
@@ -71,3 +71,13 @@ packages = [
|
|
|
71
71
|
"shapeshifter_uftp.uftp",
|
|
72
72
|
"shapeshifter_uftp.uftp.messages"
|
|
73
73
|
]
|
|
74
|
+
|
|
75
|
+
[tool.ruff.lint]
|
|
76
|
+
select = [
|
|
77
|
+
"I",
|
|
78
|
+
"W191",
|
|
79
|
+
"W291",
|
|
80
|
+
"W292",
|
|
81
|
+
"W293",
|
|
82
|
+
"F401",
|
|
83
|
+
]
|
|
@@ -1,144 +1,145 @@
|
|
|
1
|
-
from .client import (
|
|
2
|
-
ShapeshifterAgrCroClient,
|
|
3
|
-
ShapeshifterAgrDsoClient,
|
|
4
|
-
ShapeshifterCroAgrClient,
|
|
5
|
-
ShapeshifterCroDsoClient,
|
|
6
|
-
ShapeshifterDsoAgrClient,
|
|
7
|
-
ShapeshifterDsoCroClient,
|
|
8
|
-
)
|
|
9
|
-
from .oauth import OAuthClient
|
|
10
|
-
from .service import (
|
|
11
|
-
ShapeshifterAgrService,
|
|
12
|
-
ShapeshifterCroService,
|
|
13
|
-
ShapeshifterDsoService,
|
|
14
|
-
)
|
|
15
|
-
from .uftp import (
|
|
16
|
-
AcceptedRejected,
|
|
17
|
-
AgrPortfolioQuery,
|
|
18
|
-
AgrPortfolioQueryResponse,
|
|
19
|
-
AgrPortfolioQueryResponseCongestionPoint,
|
|
20
|
-
AgrPortfolioQueryResponseConnection,
|
|
21
|
-
AgrPortfolioQueryResponseDSOPortfolio,
|
|
22
|
-
AgrPortfolioQueryResponseDSOView,
|
|
23
|
-
AgrPortfolioUpdate,
|
|
24
|
-
AgrPortfolioUpdateConnection,
|
|
25
|
-
AgrPortfolioUpdateResponse,
|
|
26
|
-
ContractSettlement,
|
|
27
|
-
ContractSettlementISP,
|
|
28
|
-
ContractSettlementPeriod,
|
|
29
|
-
DPrognosis,
|
|
30
|
-
DPrognosisISP,
|
|
31
|
-
DPrognosisResponse,
|
|
32
|
-
DsoPortfolioQuery,
|
|
33
|
-
DsoPortfolioQueryCongestionPoint,
|
|
34
|
-
DsoPortfolioQueryConnection,
|
|
35
|
-
DsoPortfolioQueryResponse,
|
|
36
|
-
DsoPortfolioUpdate,
|
|
37
|
-
DsoPortfolioUpdateCongestionPoint,
|
|
38
|
-
DsoPortfolioUpdateConnection,
|
|
39
|
-
DsoPortfolioUpdateResponse,
|
|
40
|
-
FlexMessage,
|
|
41
|
-
FlexOffer,
|
|
42
|
-
FlexOfferOption,
|
|
43
|
-
FlexOfferOptionISP,
|
|
44
|
-
FlexOfferResponse,
|
|
45
|
-
FlexOfferRevocation,
|
|
46
|
-
FlexOfferRevocationResponse,
|
|
47
|
-
FlexOrder,
|
|
48
|
-
FlexOrderISP,
|
|
49
|
-
FlexOrderResponse,
|
|
50
|
-
FlexOrderSettlement,
|
|
51
|
-
FlexOrderSettlementISP,
|
|
52
|
-
FlexOrderSettlementStatus,
|
|
53
|
-
FlexOrderStatus,
|
|
54
|
-
FlexRequest,
|
|
55
|
-
FlexRequestISP,
|
|
56
|
-
FlexRequestResponse,
|
|
57
|
-
FlexReservationUpdate,
|
|
58
|
-
FlexReservationUpdateISP,
|
|
59
|
-
FlexReservationUpdateResponse,
|
|
60
|
-
FlexSettlement,
|
|
61
|
-
FlexSettlementResponse,
|
|
62
|
-
Metering,
|
|
63
|
-
MeteringISP,
|
|
64
|
-
MeteringProfile,
|
|
65
|
-
MeteringProfileEnum,
|
|
66
|
-
MeteringResponse,
|
|
67
|
-
MeteringUnit,
|
|
68
|
-
PayloadMessage,
|
|
69
|
-
PayloadMessageResponse,
|
|
70
|
-
SignedMessage,
|
|
71
|
-
TestMessage,
|
|
72
|
-
TestMessageResponse,
|
|
73
|
-
UsefRole,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
__all__ = [
|
|
77
|
-
"ShapeshifterAgrCroClient",
|
|
78
|
-
"ShapeshifterAgrDsoClient",
|
|
79
|
-
"ShapeshifterCroAgrClient",
|
|
80
|
-
"ShapeshifterCroDsoClient",
|
|
81
|
-
"ShapeshifterDsoAgrClient",
|
|
82
|
-
"ShapeshifterDsoCroClient",
|
|
83
|
-
"ShapeshifterAgrService",
|
|
84
|
-
"ShapeshifterDsoService",
|
|
85
|
-
"ShapeshifterCroService",
|
|
86
|
-
"AcceptedRejected",
|
|
87
|
-
"AgrPortfolioQuery",
|
|
88
|
-
"AgrPortfolioQueryResponse",
|
|
89
|
-
"AgrPortfolioQueryResponseCongestionPoint",
|
|
90
|
-
"AgrPortfolioQueryResponseConnection",
|
|
91
|
-
"AgrPortfolioQueryResponseDSOPortfolio",
|
|
92
|
-
"AgrPortfolioQueryResponseDSOView",
|
|
93
|
-
"AgrPortfolioUpdate",
|
|
94
|
-
"AgrPortfolioUpdateConnection",
|
|
95
|
-
"AgrPortfolioUpdateResponse",
|
|
96
|
-
"ContractSettlement",
|
|
97
|
-
"ContractSettlementISP",
|
|
98
|
-
"ContractSettlementPeriod",
|
|
99
|
-
"DPrognosis",
|
|
100
|
-
"DPrognosisISP",
|
|
101
|
-
"DPrognosisResponse",
|
|
102
|
-
"DsoPortfolioQuery",
|
|
103
|
-
"DsoPortfolioQueryCongestionPoint",
|
|
104
|
-
"DsoPortfolioQueryConnection",
|
|
105
|
-
"DsoPortfolioQueryResponse",
|
|
106
|
-
"DsoPortfolioUpdate",
|
|
107
|
-
"DsoPortfolioUpdateCongestionPoint",
|
|
108
|
-
"DsoPortfolioUpdateConnection",
|
|
109
|
-
"DsoPortfolioUpdateResponse",
|
|
110
|
-
"FlexMessage",
|
|
111
|
-
"FlexOffer",
|
|
112
|
-
"FlexOfferOption",
|
|
113
|
-
"FlexOfferOptionISP",
|
|
114
|
-
"FlexOfferResponse",
|
|
115
|
-
"FlexOfferRevocation",
|
|
116
|
-
"FlexOfferRevocationResponse",
|
|
117
|
-
"FlexOrder",
|
|
118
|
-
"FlexOrderISP",
|
|
119
|
-
"FlexOrderResponse",
|
|
120
|
-
"FlexOrderSettlement",
|
|
121
|
-
"FlexOrderSettlementISP",
|
|
122
|
-
"FlexOrderSettlementStatus",
|
|
123
|
-
"FlexOrderStatus",
|
|
124
|
-
"FlexRequest",
|
|
125
|
-
"FlexRequestISP",
|
|
126
|
-
"FlexRequestResponse",
|
|
127
|
-
"FlexReservationUpdate",
|
|
128
|
-
"FlexReservationUpdateISP",
|
|
129
|
-
"FlexReservationUpdateResponse",
|
|
130
|
-
"FlexSettlement",
|
|
131
|
-
"FlexSettlementResponse",
|
|
132
|
-
"Metering",
|
|
133
|
-
"MeteringISP",
|
|
134
|
-
"MeteringProfile",
|
|
135
|
-
"MeteringProfileEnum",
|
|
136
|
-
"MeteringResponse",
|
|
137
|
-
"MeteringUnit",
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
|
|
1
|
+
from .client import (
|
|
2
|
+
ShapeshifterAgrCroClient,
|
|
3
|
+
ShapeshifterAgrDsoClient,
|
|
4
|
+
ShapeshifterCroAgrClient,
|
|
5
|
+
ShapeshifterCroDsoClient,
|
|
6
|
+
ShapeshifterDsoAgrClient,
|
|
7
|
+
ShapeshifterDsoCroClient,
|
|
8
|
+
)
|
|
9
|
+
from .oauth import OAuthClient
|
|
10
|
+
from .service import (
|
|
11
|
+
ShapeshifterAgrService,
|
|
12
|
+
ShapeshifterCroService,
|
|
13
|
+
ShapeshifterDsoService,
|
|
14
|
+
)
|
|
15
|
+
from .uftp import (
|
|
16
|
+
AcceptedRejected,
|
|
17
|
+
AgrPortfolioQuery,
|
|
18
|
+
AgrPortfolioQueryResponse,
|
|
19
|
+
AgrPortfolioQueryResponseCongestionPoint,
|
|
20
|
+
AgrPortfolioQueryResponseConnection,
|
|
21
|
+
AgrPortfolioQueryResponseDSOPortfolio,
|
|
22
|
+
AgrPortfolioQueryResponseDSOView,
|
|
23
|
+
AgrPortfolioUpdate,
|
|
24
|
+
AgrPortfolioUpdateConnection,
|
|
25
|
+
AgrPortfolioUpdateResponse,
|
|
26
|
+
ContractSettlement,
|
|
27
|
+
ContractSettlementISP,
|
|
28
|
+
ContractSettlementPeriod,
|
|
29
|
+
DPrognosis,
|
|
30
|
+
DPrognosisISP,
|
|
31
|
+
DPrognosisResponse,
|
|
32
|
+
DsoPortfolioQuery,
|
|
33
|
+
DsoPortfolioQueryCongestionPoint,
|
|
34
|
+
DsoPortfolioQueryConnection,
|
|
35
|
+
DsoPortfolioQueryResponse,
|
|
36
|
+
DsoPortfolioUpdate,
|
|
37
|
+
DsoPortfolioUpdateCongestionPoint,
|
|
38
|
+
DsoPortfolioUpdateConnection,
|
|
39
|
+
DsoPortfolioUpdateResponse,
|
|
40
|
+
FlexMessage,
|
|
41
|
+
FlexOffer,
|
|
42
|
+
FlexOfferOption,
|
|
43
|
+
FlexOfferOptionISP,
|
|
44
|
+
FlexOfferResponse,
|
|
45
|
+
FlexOfferRevocation,
|
|
46
|
+
FlexOfferRevocationResponse,
|
|
47
|
+
FlexOrder,
|
|
48
|
+
FlexOrderISP,
|
|
49
|
+
FlexOrderResponse,
|
|
50
|
+
FlexOrderSettlement,
|
|
51
|
+
FlexOrderSettlementISP,
|
|
52
|
+
FlexOrderSettlementStatus,
|
|
53
|
+
FlexOrderStatus,
|
|
54
|
+
FlexRequest,
|
|
55
|
+
FlexRequestISP,
|
|
56
|
+
FlexRequestResponse,
|
|
57
|
+
FlexReservationUpdate,
|
|
58
|
+
FlexReservationUpdateISP,
|
|
59
|
+
FlexReservationUpdateResponse,
|
|
60
|
+
FlexSettlement,
|
|
61
|
+
FlexSettlementResponse,
|
|
62
|
+
Metering,
|
|
63
|
+
MeteringISP,
|
|
64
|
+
MeteringProfile,
|
|
65
|
+
MeteringProfileEnum,
|
|
66
|
+
MeteringResponse,
|
|
67
|
+
MeteringUnit,
|
|
68
|
+
PayloadMessage,
|
|
69
|
+
PayloadMessageResponse,
|
|
70
|
+
SignedMessage,
|
|
71
|
+
TestMessage,
|
|
72
|
+
TestMessageResponse,
|
|
73
|
+
UsefRole,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
__all__ = [
|
|
77
|
+
"ShapeshifterAgrCroClient",
|
|
78
|
+
"ShapeshifterAgrDsoClient",
|
|
79
|
+
"ShapeshifterCroAgrClient",
|
|
80
|
+
"ShapeshifterCroDsoClient",
|
|
81
|
+
"ShapeshifterDsoAgrClient",
|
|
82
|
+
"ShapeshifterDsoCroClient",
|
|
83
|
+
"ShapeshifterAgrService",
|
|
84
|
+
"ShapeshifterDsoService",
|
|
85
|
+
"ShapeshifterCroService",
|
|
86
|
+
"AcceptedRejected",
|
|
87
|
+
"AgrPortfolioQuery",
|
|
88
|
+
"AgrPortfolioQueryResponse",
|
|
89
|
+
"AgrPortfolioQueryResponseCongestionPoint",
|
|
90
|
+
"AgrPortfolioQueryResponseConnection",
|
|
91
|
+
"AgrPortfolioQueryResponseDSOPortfolio",
|
|
92
|
+
"AgrPortfolioQueryResponseDSOView",
|
|
93
|
+
"AgrPortfolioUpdate",
|
|
94
|
+
"AgrPortfolioUpdateConnection",
|
|
95
|
+
"AgrPortfolioUpdateResponse",
|
|
96
|
+
"ContractSettlement",
|
|
97
|
+
"ContractSettlementISP",
|
|
98
|
+
"ContractSettlementPeriod",
|
|
99
|
+
"DPrognosis",
|
|
100
|
+
"DPrognosisISP",
|
|
101
|
+
"DPrognosisResponse",
|
|
102
|
+
"DsoPortfolioQuery",
|
|
103
|
+
"DsoPortfolioQueryCongestionPoint",
|
|
104
|
+
"DsoPortfolioQueryConnection",
|
|
105
|
+
"DsoPortfolioQueryResponse",
|
|
106
|
+
"DsoPortfolioUpdate",
|
|
107
|
+
"DsoPortfolioUpdateCongestionPoint",
|
|
108
|
+
"DsoPortfolioUpdateConnection",
|
|
109
|
+
"DsoPortfolioUpdateResponse",
|
|
110
|
+
"FlexMessage",
|
|
111
|
+
"FlexOffer",
|
|
112
|
+
"FlexOfferOption",
|
|
113
|
+
"FlexOfferOptionISP",
|
|
114
|
+
"FlexOfferResponse",
|
|
115
|
+
"FlexOfferRevocation",
|
|
116
|
+
"FlexOfferRevocationResponse",
|
|
117
|
+
"FlexOrder",
|
|
118
|
+
"FlexOrderISP",
|
|
119
|
+
"FlexOrderResponse",
|
|
120
|
+
"FlexOrderSettlement",
|
|
121
|
+
"FlexOrderSettlementISP",
|
|
122
|
+
"FlexOrderSettlementStatus",
|
|
123
|
+
"FlexOrderStatus",
|
|
124
|
+
"FlexRequest",
|
|
125
|
+
"FlexRequestISP",
|
|
126
|
+
"FlexRequestResponse",
|
|
127
|
+
"FlexReservationUpdate",
|
|
128
|
+
"FlexReservationUpdateISP",
|
|
129
|
+
"FlexReservationUpdateResponse",
|
|
130
|
+
"FlexSettlement",
|
|
131
|
+
"FlexSettlementResponse",
|
|
132
|
+
"Metering",
|
|
133
|
+
"MeteringISP",
|
|
134
|
+
"MeteringProfile",
|
|
135
|
+
"MeteringProfileEnum",
|
|
136
|
+
"MeteringResponse",
|
|
137
|
+
"MeteringUnit",
|
|
138
|
+
"OAuthClient",
|
|
139
|
+
"PayloadMessage",
|
|
140
|
+
"PayloadMessageResponse",
|
|
141
|
+
"SignedMessage",
|
|
142
|
+
"TestMessage",
|
|
143
|
+
"TestMessageResponse",
|
|
144
|
+
"UsefRole",
|
|
145
|
+
]
|
{shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/agr_cro_client.py
RENAMED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
from ..uftp import
|
|
1
|
+
from ..uftp import (
|
|
2
|
+
AgrPortfolioQuery,
|
|
3
|
+
AgrPortfolioUpdate,
|
|
4
|
+
UsefRole,
|
|
5
|
+
)
|
|
2
6
|
from .base_client import ShapeshifterClient
|
|
3
7
|
|
|
4
8
|
|
|
@@ -7,17 +11,17 @@ class ShapeshifterAgrCroClient(ShapeshifterClient):
|
|
|
7
11
|
Client that allows the Aggregator to connect to the CRO.
|
|
8
12
|
"""
|
|
9
13
|
|
|
10
|
-
sender_role =
|
|
11
|
-
recipient_role =
|
|
14
|
+
sender_role = UsefRole.AGR
|
|
15
|
+
recipient_role = UsefRole.CRO
|
|
12
16
|
|
|
13
|
-
def send_agr_portfolio_update(self, message: AgrPortfolioUpdate) ->
|
|
17
|
+
def send_agr_portfolio_update(self, message: AgrPortfolioUpdate) -> None:
|
|
14
18
|
"""
|
|
15
19
|
The AGRPortfolioUpdate is used by the AGR to indicate on which
|
|
16
20
|
Connections it represents prosumers.
|
|
17
21
|
"""
|
|
18
22
|
return self._send_message(message)
|
|
19
23
|
|
|
20
|
-
def send_agr_portfolio_query(self, message: AgrPortfolioQuery) ->
|
|
24
|
+
def send_agr_portfolio_query(self, message: AgrPortfolioQuery) -> None:
|
|
21
25
|
"""
|
|
22
26
|
The AGRPortfolioQuery is used by the AGR to retrieve additional
|
|
23
27
|
information on the connections.
|
{shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/agr_dso_client.py
RENAMED
|
@@ -7,7 +7,7 @@ from ..uftp import (
|
|
|
7
7
|
FlexReservationUpdateResponse,
|
|
8
8
|
FlexSettlementResponse,
|
|
9
9
|
Metering,
|
|
10
|
-
|
|
10
|
+
UsefRole,
|
|
11
11
|
)
|
|
12
12
|
from .base_client import ShapeshifterClient
|
|
13
13
|
|
|
@@ -17,10 +17,10 @@ class ShapeshifterAgrDsoClient(ShapeshifterClient):
|
|
|
17
17
|
Client that allows the Aggregator to connect to the DSO.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
sender_role =
|
|
21
|
-
recipient_role =
|
|
20
|
+
sender_role = UsefRole.AGR
|
|
21
|
+
recipient_role = UsefRole.DSO
|
|
22
22
|
|
|
23
|
-
def send_d_prognosis(self, message: DPrognosis) ->
|
|
23
|
+
def send_d_prognosis(self, message: DPrognosis) -> None:
|
|
24
24
|
"""
|
|
25
25
|
D-Prognosis messages are used to communicate D-prognoses between AGRs
|
|
26
26
|
and DSOs. D-Prognosis messages always contain data for all ISPs for the
|
|
@@ -31,7 +31,7 @@ class ShapeshifterAgrDsoClient(ShapeshifterClient):
|
|
|
31
31
|
"""
|
|
32
32
|
return self._send_message(message)
|
|
33
33
|
|
|
34
|
-
def send_flex_request_response(self, message: FlexRequestResponse) ->
|
|
34
|
+
def send_flex_request_response(self, message: FlexRequestResponse) -> None:
|
|
35
35
|
"""
|
|
36
36
|
Upon receiving and processing a FlexRequest message, the receiving
|
|
37
37
|
implementation must reply with a FlexRequestResponse, indicating
|
|
@@ -39,7 +39,7 @@ class ShapeshifterAgrDsoClient(ShapeshifterClient):
|
|
|
39
39
|
"""
|
|
40
40
|
return self._send_message(message)
|
|
41
41
|
|
|
42
|
-
def send_flex_offer(self, message: FlexOffer) ->
|
|
42
|
+
def send_flex_offer(self, message: FlexOffer) -> None:
|
|
43
43
|
"""
|
|
44
44
|
FlexOffer messages are used by AGRs to make DSOs an offer for provision
|
|
45
45
|
of flexibility. A FlexOffer message contains a list of ISPs and, for
|
|
@@ -52,24 +52,24 @@ class ShapeshifterAgrDsoClient(ShapeshifterClient):
|
|
|
52
52
|
sure that it can actually provide the flexibility offered across all of
|
|
53
53
|
its FlexOffers.
|
|
54
54
|
"""
|
|
55
|
-
|
|
55
|
+
self._send_message(message)
|
|
56
56
|
|
|
57
|
-
def send_flex_offer_revocation(self, message: FlexOfferRevocation) ->
|
|
57
|
+
def send_flex_offer_revocation(self, message: FlexOfferRevocation) -> None:
|
|
58
58
|
"""
|
|
59
59
|
The FlexOfferRevocation message is used by the AGR to revoke a FlexOffer
|
|
60
60
|
previously sent to a DSO. It voids the FlexOffer, even if its validity
|
|
61
61
|
time has not yet expired. Revocation is not allowed for FlexOffers that
|
|
62
62
|
already have associated accepted FlexOrders.
|
|
63
63
|
"""
|
|
64
|
-
|
|
64
|
+
self._send_message(message)
|
|
65
65
|
|
|
66
|
-
def send_flex_order_response(self, message: FlexOrderResponse) ->
|
|
66
|
+
def send_flex_order_response(self, message: FlexOrderResponse) -> None:
|
|
67
67
|
"""
|
|
68
68
|
Confirm the flex order.
|
|
69
69
|
"""
|
|
70
|
-
|
|
70
|
+
self._send_message(message)
|
|
71
71
|
|
|
72
|
-
def send_flex_settlement_response(self, message: FlexSettlementResponse) ->
|
|
72
|
+
def send_flex_settlement_response(self, message: FlexSettlementResponse) -> None:
|
|
73
73
|
"""
|
|
74
74
|
Upon receiving and processing a FlexSettlement message, the AGR must
|
|
75
75
|
reply with a FlexSettlementResponse, indicating whether the initial
|
|
@@ -77,16 +77,16 @@ class ShapeshifterAgrDsoClient(ShapeshifterClient):
|
|
|
77
77
|
rejected, the DSO should consider all FlexOrderSettlement elements of
|
|
78
78
|
that message related to potential dispute.
|
|
79
79
|
"""
|
|
80
|
-
|
|
80
|
+
self._send_message(message)
|
|
81
81
|
|
|
82
|
-
def send_flex_reservation_update_response(self, message: FlexReservationUpdateResponse) ->
|
|
82
|
+
def send_flex_reservation_update_response(self, message: FlexReservationUpdateResponse) -> None:
|
|
83
83
|
"""
|
|
84
84
|
Confirm the flex reservation update.
|
|
85
85
|
"""
|
|
86
|
-
|
|
86
|
+
self._send_message(message)
|
|
87
87
|
|
|
88
|
-
def send_metering(self, message: Metering) ->
|
|
88
|
+
def send_metering(self, message: Metering) -> None:
|
|
89
89
|
"""
|
|
90
90
|
Send metering data to the DSO.
|
|
91
91
|
"""
|
|
92
|
-
|
|
92
|
+
self._send_message(message)
|
|
@@ -11,7 +11,13 @@ from .. import transport
|
|
|
11
11
|
from ..exceptions import ClientTransportException
|
|
12
12
|
from ..logging import logger
|
|
13
13
|
from ..oauth import OAuthClient, PassthroughOAuthClient
|
|
14
|
-
from ..uftp import
|
|
14
|
+
from ..uftp import (
|
|
15
|
+
PayloadMessage,
|
|
16
|
+
SignedMessage,
|
|
17
|
+
TestMessage,
|
|
18
|
+
TestMessageResponse,
|
|
19
|
+
UsefRole,
|
|
20
|
+
)
|
|
15
21
|
|
|
16
22
|
|
|
17
23
|
class ShapeshifterClient:
|
|
@@ -19,8 +25,8 @@ class ShapeshifterClient:
|
|
|
19
25
|
Basis for all Shapeshifter client.
|
|
20
26
|
"""
|
|
21
27
|
|
|
22
|
-
sender_role:
|
|
23
|
-
recipient_role:
|
|
28
|
+
sender_role: UsefRole
|
|
29
|
+
recipient_role: UsefRole
|
|
24
30
|
num_outgoing_workers = 10
|
|
25
31
|
num_delivery_attempts = 10
|
|
26
32
|
request_timeout = 30
|
|
@@ -32,9 +38,9 @@ class ShapeshifterClient:
|
|
|
32
38
|
sender_domain: str,
|
|
33
39
|
signing_key: str,
|
|
34
40
|
recipient_domain: str,
|
|
35
|
-
recipient_endpoint: str = None,
|
|
36
|
-
recipient_signing_key: str = None,
|
|
37
|
-
oauth_client: OAuthClient = None,
|
|
41
|
+
recipient_endpoint: str | None = None,
|
|
42
|
+
recipient_signing_key: str | None = None,
|
|
43
|
+
oauth_client: OAuthClient | None = None,
|
|
38
44
|
version: str = "3.1.0"
|
|
39
45
|
):
|
|
40
46
|
"""
|
|
@@ -80,7 +86,19 @@ class ShapeshifterClient:
|
|
|
80
86
|
else:
|
|
81
87
|
self.oauth_client = PassthroughOAuthClient()
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
# ------------------------------------------------------------ #
|
|
90
|
+
# Test Messages #
|
|
91
|
+
# ------------------------------------------------------------ #
|
|
92
|
+
def send_test_message(self, message: TestMessage | None = None):
|
|
93
|
+
if message is None:
|
|
94
|
+
message = TestMessage()
|
|
95
|
+
|
|
96
|
+
return self._send_message(message)
|
|
97
|
+
|
|
98
|
+
def send_test_message_response(self, message: TestMessageResponse):
|
|
99
|
+
return self._send_message(message)
|
|
100
|
+
|
|
101
|
+
def _send_message(self, message: PayloadMessage) -> None:
|
|
84
102
|
"""
|
|
85
103
|
Perform an operation. This will take the message object, pack
|
|
86
104
|
it up into a SignedMessage, sign and seal it, and send it to
|
|
@@ -101,7 +119,6 @@ class ShapeshifterClient:
|
|
|
101
119
|
# properties can be calculated in the framework anyway.
|
|
102
120
|
message.version = self.version
|
|
103
121
|
message.sender_domain = self.sender_domain
|
|
104
|
-
message.sender_role = self.sender_role
|
|
105
122
|
message.recipient_domain = self.recipient_domain
|
|
106
123
|
message.time_stamp = (
|
|
107
124
|
message.time_stamp or datetime.now(timezone.utc).isoformat()
|
|
@@ -146,28 +163,6 @@ class ShapeshifterClient:
|
|
|
146
163
|
logger.error(error_msg)
|
|
147
164
|
raise ClientTransportException(error_msg, response=response)
|
|
148
165
|
|
|
149
|
-
# If the response was empty, don't attempt to parse it
|
|
150
|
-
if len(response.content) == 0:
|
|
151
|
-
return None
|
|
152
|
-
|
|
153
|
-
# Instantiate a SignedMessage object from the response bytes.
|
|
154
|
-
sealed_response = transport.parser.from_bytes(response.content)
|
|
155
|
-
|
|
156
|
-
# Use the static key that was provided when the client was
|
|
157
|
-
# initialized, or retrieve the key using DNS. The DNS
|
|
158
|
-
# implementation caches the DNS lookups so they are not that
|
|
159
|
-
# expensive after the first time.
|
|
160
|
-
if not (recipient_signing_key := self.recipient_signing_key):
|
|
161
|
-
recipient_signing_key = transport.get_key(
|
|
162
|
-
self.recipient_domain, self.recipient_role
|
|
163
|
-
)
|
|
164
|
-
|
|
165
|
-
# Unseal the response using the other party's public signing
|
|
166
|
-
# key and return the response message within it
|
|
167
|
-
return transport.unseal_message(
|
|
168
|
-
message=sealed_response.body, public_key=recipient_signing_key
|
|
169
|
-
)
|
|
170
|
-
|
|
171
166
|
# ------------------------------------------------------------ #
|
|
172
167
|
# Methods related to queueing and scheduling outgoing #
|
|
173
168
|
# messages. #
|
{shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/cro_agr_client.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from ..uftp import AgrPortfolioQueryResponse, AgrPortfolioUpdateResponse
|
|
1
|
+
from ..uftp import AgrPortfolioQueryResponse, AgrPortfolioUpdateResponse, UsefRole
|
|
2
2
|
from .base_client import ShapeshifterClient
|
|
3
3
|
|
|
4
4
|
|
|
@@ -7,19 +7,19 @@ class ShapeshifterCroAgrClient(ShapeshifterClient):
|
|
|
7
7
|
Client that allows the CRO to connect to the Aggregator.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
sender_role =
|
|
11
|
-
recipient_role =
|
|
10
|
+
sender_role = UsefRole.CRO
|
|
11
|
+
recipient_role = UsefRole.AGR
|
|
12
12
|
|
|
13
|
-
def send_agr_portfolio_update_response(self, message: AgrPortfolioUpdateResponse):
|
|
13
|
+
def send_agr_portfolio_update_response(self, message: AgrPortfolioUpdateResponse) -> None:
|
|
14
14
|
"""
|
|
15
15
|
The DSOPortfolioUpdate is used by the DSO to indicate on which
|
|
16
16
|
congestion points it wants to engage in flexibility trading.
|
|
17
17
|
"""
|
|
18
|
-
|
|
18
|
+
self._send_message(message)
|
|
19
19
|
|
|
20
|
-
def send_agr_portfolio_query_response(self, message: AgrPortfolioQueryResponse):
|
|
20
|
+
def send_agr_portfolio_query_response(self, message: AgrPortfolioQueryResponse) -> None:
|
|
21
21
|
"""
|
|
22
22
|
DSOPortfolioQuery is used by DSOs to discover which AGRs represent
|
|
23
23
|
connections on its registered congestion point(s).
|
|
24
24
|
"""
|
|
25
|
-
|
|
25
|
+
self._send_message(message)
|
{shapeshifter_uftp-2.2.0 → shapeshifter_uftp-2.3.0}/shapeshifter_uftp/client/cro_dso_client.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from ..uftp import DsoPortfolioQueryResponse, DsoPortfolioUpdateResponse
|
|
1
|
+
from ..uftp import DsoPortfolioQueryResponse, DsoPortfolioUpdateResponse, UsefRole
|
|
2
2
|
from .base_client import ShapeshifterClient
|
|
3
3
|
|
|
4
4
|
|
|
@@ -15,19 +15,19 @@ class ShapeshifterCroDsoClient(ShapeshifterClient):
|
|
|
15
15
|
DsoPortfolioQuery, respectively.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
sender_role =
|
|
19
|
-
recipient_role =
|
|
18
|
+
sender_role = UsefRole.CRO
|
|
19
|
+
recipient_role = UsefRole.DSO
|
|
20
20
|
|
|
21
|
-
def send_dso_portfolio_update_response(self, message: DsoPortfolioUpdateResponse):
|
|
21
|
+
def send_dso_portfolio_update_response(self, message: DsoPortfolioUpdateResponse) -> None:
|
|
22
22
|
"""
|
|
23
23
|
The DSOPortfolioUpdate is used by the DSO to indicate on which
|
|
24
24
|
congestion points it wants to engage in flexibility trading.
|
|
25
25
|
"""
|
|
26
|
-
|
|
26
|
+
self._send_message(message)
|
|
27
27
|
|
|
28
|
-
def send_dso_portfolio_query_response(self, message: DsoPortfolioQueryResponse):
|
|
28
|
+
def send_dso_portfolio_query_response(self, message: DsoPortfolioQueryResponse) -> None:
|
|
29
29
|
"""
|
|
30
30
|
DSOPortfolioQuery is used by DSOs to discover which AGRs represent
|
|
31
31
|
connections on its registered congestion point(s).
|
|
32
32
|
"""
|
|
33
|
-
|
|
33
|
+
self._send_message(message)
|