mms-client 1.9.0__tar.gz → 1.9.1__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.
- {mms_client-1.9.0 → mms_client-1.9.1}/PKG-INFO +1 -1
- {mms_client-1.9.0 → mms_client-1.9.1}/pyproject.toml +1 -1
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/services/market.py +2 -1
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/services/registration.py +2 -1
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/award.py +33 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/market.py +1 -3
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/offer.py +23 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/registration.py +1 -3
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/report.py +14 -1
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/reserve.py +13 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/resource.py +1 -1
- {mms_client-1.9.0 → mms_client-1.9.1}/LICENSE +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/README.md +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/__init__.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/client.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/py.typed +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/schemas/wsdl/mi-web-service-jbms.wsdl +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/schemas/wsdl/omi-web-service.wsdl +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/schemas/xsd/mi-market.xsd +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/schemas/xsd/mi-outbnd-reports.xsd +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/schemas/xsd/mi-report.xsd +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/schemas/xsd/mpr.xsd +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/schemas/xsd/omi.xsd +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/security/__init__.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/security/certs.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/security/crypto.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/services/__init__.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/services/base.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/services/omi.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/services/report.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/__init__.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/base.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/enums.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/fields.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/types/transport.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/utils/__init__.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/utils/errors.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/utils/multipart_transport.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/utils/plugin.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/utils/serialization.py +0 -0
- {mms_client-1.9.0 → mms_client-1.9.1}/src/mms_client/utils/web.py +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"""Contains the client layer for making market requests to the MMS server."""
|
|
2
2
|
|
|
3
|
-
from datetime import date as Date
|
|
4
3
|
from logging import getLogger
|
|
5
4
|
from typing import List
|
|
6
5
|
from typing import Optional
|
|
7
6
|
|
|
7
|
+
from pydantic_extra_types.pendulum_dt import Date
|
|
8
|
+
|
|
8
9
|
from mms_client.services.base import ClientProto
|
|
9
10
|
from mms_client.services.base import ServiceConfiguration
|
|
10
11
|
from mms_client.services.base import mms_endpoint
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"""Contains the client layer for making registration requests to the MMS server."""
|
|
2
2
|
|
|
3
|
-
from datetime import date as Date
|
|
4
3
|
from logging import getLogger
|
|
5
4
|
from typing import List
|
|
6
5
|
from typing import Optional
|
|
7
6
|
|
|
7
|
+
from pydantic_extra_types.pendulum_dt import Date
|
|
8
|
+
|
|
8
9
|
from mms_client.services.base import ClientProto
|
|
9
10
|
from mms_client.services.base import ServiceConfiguration
|
|
10
11
|
from mms_client.services.base import mms_endpoint
|
|
@@ -5,6 +5,9 @@ from enum import Enum
|
|
|
5
5
|
from typing import List
|
|
6
6
|
from typing import Optional
|
|
7
7
|
|
|
8
|
+
from pendulum import Timezone
|
|
9
|
+
from pydantic import field_serializer
|
|
10
|
+
from pydantic import field_validator
|
|
8
11
|
from pydantic_core import PydanticUndefined
|
|
9
12
|
from pydantic_extra_types.pendulum_dt import DateTime
|
|
10
13
|
from pydantic_xml import attr
|
|
@@ -109,6 +112,16 @@ class AwardQuery(Payload, tag="AwardResultsQuery"):
|
|
|
109
112
|
# regardless of gate closure.
|
|
110
113
|
gate_closed: Optional[BooleanFlag] = attr(default=None, name="AfterGC")
|
|
111
114
|
|
|
115
|
+
@field_serializer("start", "end")
|
|
116
|
+
def encode_datetime(self, value: DateTime) -> str:
|
|
117
|
+
"""Encode the datetime to an MMS-compliant ISO 8601 string."""
|
|
118
|
+
return value.replace(tzinfo=None).isoformat()
|
|
119
|
+
|
|
120
|
+
@field_validator("start", "end")
|
|
121
|
+
def decode_datetime(cls, value: DateTime) -> DateTime: # pylint: disable=no-self-argument
|
|
122
|
+
"""Decode the datetime from an MMS-compliant ISO 8601 string."""
|
|
123
|
+
return value.replace(tzinfo=Timezone("Asia/Tokyo"))
|
|
124
|
+
|
|
112
125
|
|
|
113
126
|
class Award(Payload):
|
|
114
127
|
"""Represents the details of a bid award."""
|
|
@@ -286,6 +299,16 @@ class Award(Payload):
|
|
|
286
299
|
# Whether we are before gate close or after gate close
|
|
287
300
|
gate_closed: BooleanFlag = attr(name="AfterGC")
|
|
288
301
|
|
|
302
|
+
@field_serializer("submission_time")
|
|
303
|
+
def encode_datetime(self, value: DateTime) -> str:
|
|
304
|
+
"""Encode the datetime to an MMS-compliant ISO 8601 string."""
|
|
305
|
+
return value.replace(tzinfo=None).isoformat() if value else ""
|
|
306
|
+
|
|
307
|
+
@field_validator("submission_time")
|
|
308
|
+
def decode_datetime(cls, value: DateTime) -> DateTime: # pylint: disable=no-self-argument
|
|
309
|
+
"""Decode the datetime from an MMS-compliant ISO 8601 string."""
|
|
310
|
+
return value.replace(tzinfo=Timezone("Asia/Tokyo"))
|
|
311
|
+
|
|
289
312
|
|
|
290
313
|
class AwardResult(Payload, tag="AwardResults"):
|
|
291
314
|
"""Contains a number of bid rewards associated with a block of time and trade direction."""
|
|
@@ -302,6 +325,16 @@ class AwardResult(Payload, tag="AwardResults"):
|
|
|
302
325
|
# The bid awards associated with these parameters
|
|
303
326
|
data: List[Award] = element(tag="AwardResultsData", min_length=1)
|
|
304
327
|
|
|
328
|
+
@field_serializer("start", "end")
|
|
329
|
+
def encode_datetime(self, value: DateTime) -> str:
|
|
330
|
+
"""Encode the datetime to an MMS-compliant ISO 8601 string."""
|
|
331
|
+
return value.replace(tzinfo=None).isoformat()
|
|
332
|
+
|
|
333
|
+
@field_validator("start", "end")
|
|
334
|
+
def decode_datetime(cls, value: DateTime) -> DateTime: # pylint: disable=no-self-argument
|
|
335
|
+
"""Decode the datetime from an MMS-compliant ISO 8601 string."""
|
|
336
|
+
return value.replace(tzinfo=Timezone("Asia/Tokyo"))
|
|
337
|
+
|
|
305
338
|
|
|
306
339
|
class AwardResponse(AwardQuery, tag="AwardResultsQuery"):
|
|
307
340
|
"""Contains the results of a bid award query."""
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"""Contains objects for market information."""
|
|
2
2
|
|
|
3
|
-
# Have to use this becasue pydantic doesn't like pendulum.Date. I've submitted a PR to address this but it hasn't been
|
|
4
|
-
# merged or released yet.
|
|
5
|
-
from datetime import date as Date
|
|
6
3
|
from enum import Enum
|
|
7
4
|
from typing import Optional
|
|
8
5
|
|
|
6
|
+
from pydantic_extra_types.pendulum_dt import Date
|
|
9
7
|
from pydantic_xml import attr
|
|
10
8
|
|
|
11
9
|
from mms_client.types.base import Envelope
|
|
@@ -4,6 +4,9 @@ from decimal import Decimal
|
|
|
4
4
|
from typing import List
|
|
5
5
|
from typing import Optional
|
|
6
6
|
|
|
7
|
+
from pendulum import Timezone
|
|
8
|
+
from pydantic import field_serializer
|
|
9
|
+
from pydantic import field_validator
|
|
7
10
|
from pydantic_extra_types.pendulum_dt import DateTime
|
|
8
11
|
from pydantic_xml import attr
|
|
9
12
|
from pydantic_xml import element
|
|
@@ -115,6 +118,16 @@ class OfferData(Payload):
|
|
|
115
118
|
# The date and time when the offer was submitted
|
|
116
119
|
submission_time: Optional[DateTime] = attr(default=None, name="SubmissionTime")
|
|
117
120
|
|
|
121
|
+
@field_serializer("start", "end", "submission_time")
|
|
122
|
+
def encode_datetime(self, value: DateTime) -> str:
|
|
123
|
+
"""Encode the datetime to an MMS-compliant ISO 8601 string."""
|
|
124
|
+
return value.replace(tzinfo=None).isoformat() if value else ""
|
|
125
|
+
|
|
126
|
+
@field_validator("start", "end", "submission_time")
|
|
127
|
+
def decode_datetime(cls, value: DateTime) -> DateTime: # pylint: disable=no-self-argument
|
|
128
|
+
"""Decode the datetime from an MMS-compliant ISO 8601 string."""
|
|
129
|
+
return value.replace(tzinfo=Timezone("Asia/Tokyo"))
|
|
130
|
+
|
|
118
131
|
|
|
119
132
|
class OfferCancel(Payload):
|
|
120
133
|
"""Describes the data necessary to cancel an offer in the MMS."""
|
|
@@ -132,6 +145,16 @@ class OfferCancel(Payload):
|
|
|
132
145
|
# The type of market for the offer was submitted on
|
|
133
146
|
market_type: MarketType = attr(name="MarketType")
|
|
134
147
|
|
|
148
|
+
@field_serializer("start", "end")
|
|
149
|
+
def encode_datetime(self, value: DateTime) -> str:
|
|
150
|
+
"""Encode the datetime to an MMS-compliant ISO 8601 string."""
|
|
151
|
+
return value.replace(tzinfo=None).isoformat()
|
|
152
|
+
|
|
153
|
+
@field_validator("start", "end")
|
|
154
|
+
def decode_datetime(cls, value: DateTime) -> DateTime: # pylint: disable=no-self-argument
|
|
155
|
+
"""Decode the datetime from an MMS-compliant ISO 8601 string."""
|
|
156
|
+
return value.replace(tzinfo=Timezone("Asia/Tokyo"))
|
|
157
|
+
|
|
135
158
|
|
|
136
159
|
class OfferQuery(Payload):
|
|
137
160
|
"""Describes the data necessary to query for offers in the MMS."""
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"""Contains objects for registrations."""
|
|
2
2
|
|
|
3
|
-
# Have to use this becasue pydantic doesn't like pendulum.Date. I've submitted a PR to address this but it hasn't been
|
|
4
|
-
# merged or released yet.
|
|
5
|
-
from datetime import date as Date
|
|
6
3
|
from enum import Enum
|
|
7
4
|
from typing import Optional
|
|
8
5
|
|
|
6
|
+
from pydantic_extra_types.pendulum_dt import Date
|
|
9
7
|
from pydantic_xml import attr
|
|
10
8
|
|
|
11
9
|
from mms_client.types.base import Envelope
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"""Contains objects for report data."""
|
|
2
2
|
|
|
3
|
-
from datetime import date as Date
|
|
4
3
|
from decimal import Decimal
|
|
5
4
|
from enum import StrEnum
|
|
6
5
|
from typing import Annotated
|
|
7
6
|
from typing import List
|
|
8
7
|
from typing import Optional
|
|
9
8
|
|
|
9
|
+
from pendulum import Timezone as TZ
|
|
10
|
+
from pydantic import field_serializer
|
|
11
|
+
from pydantic import field_validator
|
|
10
12
|
from pydantic_core import PydanticUndefined
|
|
13
|
+
from pydantic_extra_types.pendulum_dt import Date
|
|
11
14
|
from pydantic_extra_types.pendulum_dt import DateTime
|
|
12
15
|
from pydantic_xml import BaseXmlModel
|
|
13
16
|
from pydantic_xml import attr
|
|
@@ -331,6 +334,16 @@ class OutboundData(Envelope):
|
|
|
331
334
|
# The time the report was published
|
|
332
335
|
publish_time: Optional[DateTime] = attr(default=None, name="PublishTime")
|
|
333
336
|
|
|
337
|
+
@field_serializer("publish_time")
|
|
338
|
+
def encode_datetime(self, value: DateTime) -> str:
|
|
339
|
+
"""Encode the datetime to an MMS-compliant ISO 8601 string."""
|
|
340
|
+
return value.replace(tzinfo=None).isoformat() if value else ""
|
|
341
|
+
|
|
342
|
+
@field_validator("publish_time")
|
|
343
|
+
def decode_datetime(cls, value: DateTime) -> DateTime: # pylint: disable=no-self-argument
|
|
344
|
+
"""Decode the datetime from an MMS-compliant ISO 8601 string."""
|
|
345
|
+
return value.replace(tzinfo=TZ("Asia/Tokyo"))
|
|
346
|
+
|
|
334
347
|
|
|
335
348
|
class ReportLineBase(Payload):
|
|
336
349
|
"""Represents the base fields for a report line item."""
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
from typing import List
|
|
4
4
|
from typing import Optional
|
|
5
5
|
|
|
6
|
+
from pendulum import Timezone
|
|
7
|
+
from pydantic import field_serializer
|
|
8
|
+
from pydantic import field_validator
|
|
6
9
|
from pydantic_extra_types.pendulum_dt import DateTime
|
|
7
10
|
from pydantic_xml import attr
|
|
8
11
|
from pydantic_xml import element
|
|
@@ -50,6 +53,16 @@ class Requirement(Payload):
|
|
|
50
53
|
# The minimum reserve of compound primary and tertiary 1 in kW
|
|
51
54
|
primary_tertiary_1_qty_kw: Optional[int] = power_positive("CompoundPriTer1ReserveQuantityInKw", True)
|
|
52
55
|
|
|
56
|
+
@field_serializer("start", "end")
|
|
57
|
+
def encode_datetime(self, value: DateTime) -> str:
|
|
58
|
+
"""Encode the datetime to an MMS-compliant ISO 8601 string."""
|
|
59
|
+
return value.replace(tzinfo=None).isoformat()
|
|
60
|
+
|
|
61
|
+
@field_validator("start", "end")
|
|
62
|
+
def decode_datetime(cls, value: DateTime) -> DateTime: # pylint: disable=no-self-argument
|
|
63
|
+
"""Decode the datetime from an MMS-compliant ISO 8601 string."""
|
|
64
|
+
return value.replace(tzinfo=Timezone("Asia/Tokyo"))
|
|
65
|
+
|
|
53
66
|
|
|
54
67
|
class ReserveRequirement(Payload):
|
|
55
68
|
"""Represents a set of reserve requirements."""
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
# pylint: disable=too-many-lines
|
|
4
4
|
|
|
5
|
-
from datetime import date as Date
|
|
6
5
|
from decimal import Decimal
|
|
7
6
|
from enum import Enum
|
|
8
7
|
from typing import Annotated
|
|
@@ -10,6 +9,7 @@ from typing import List
|
|
|
10
9
|
from typing import Optional
|
|
11
10
|
|
|
12
11
|
from pydantic_core import PydanticUndefined
|
|
12
|
+
from pydantic_extra_types.pendulum_dt import Date
|
|
13
13
|
from pydantic_xml import attr
|
|
14
14
|
from pydantic_xml import element
|
|
15
15
|
from pydantic_xml import wrapped
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|