frequenz-client-electricity-trading 0.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.
- frequenz-client-electricity-trading-0.1.0/LICENSE +21 -0
- frequenz-client-electricity-trading-0.1.0/MANIFEST.in +13 -0
- frequenz-client-electricity-trading-0.1.0/PKG-INFO +53 -0
- frequenz-client-electricity-trading-0.1.0/README.md +22 -0
- frequenz-client-electricity-trading-0.1.0/RELEASE_NOTES.md +5 -0
- frequenz-client-electricity-trading-0.1.0/pyproject.toml +172 -0
- frequenz-client-electricity-trading-0.1.0/setup.cfg +4 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz/client/electricity_trading/__init__.py +60 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz/client/electricity_trading/_client.py +683 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz/client/electricity_trading/_types.py +1790 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz/client/electricity_trading/conftest.py +13 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz/client/electricity_trading/py.typed +0 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz_client_electricity_trading.egg-info/PKG-INFO +53 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz_client_electricity_trading.egg-info/SOURCES.txt +15 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz_client_electricity_trading.egg-info/dependency_links.txt +1 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz_client_electricity_trading.egg-info/requires.txt +53 -0
- frequenz-client-electricity-trading-0.1.0/src/frequenz_client_electricity_trading.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2024 Frequenz Energy-as-a-Service GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
exclude .cookiecutter-replay.json
|
|
2
|
+
exclude .editorconfig
|
|
3
|
+
exclude .gitignore
|
|
4
|
+
exclude CODEOWNERS
|
|
5
|
+
exclude CONTRIBUTING.md
|
|
6
|
+
exclude mkdocs.yml
|
|
7
|
+
exclude noxfile.py
|
|
8
|
+
exclude src/conftest.py
|
|
9
|
+
recursive-exclude .github *
|
|
10
|
+
recursive-exclude benchmarks *
|
|
11
|
+
recursive-exclude docs *
|
|
12
|
+
recursive-exclude tests *
|
|
13
|
+
recursive-include py *.pyi
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: frequenz-client-electricity-trading
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Electricity Trading API client for Python
|
|
5
|
+
Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Documentation, https://frequenz-floss.github.io/frequenz-client-electricity-trading-python/
|
|
8
|
+
Project-URL: Changelog, https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/releases
|
|
9
|
+
Project-URL: Issues, https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/issues
|
|
10
|
+
Project-URL: Repository, https://github.com/frequenz-floss/frequenz-client-electricity-trading-python
|
|
11
|
+
Project-URL: Support, https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/discussions/categories/support
|
|
12
|
+
Keywords: frequenz,python,lib,library,client-electricity-trading,client,api,python,trading,electricity-trading
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: <4,>=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Provides-Extra: dev-flake8
|
|
23
|
+
Provides-Extra: dev-formatting
|
|
24
|
+
Provides-Extra: dev-mkdocs
|
|
25
|
+
Provides-Extra: dev-mypy
|
|
26
|
+
Provides-Extra: dev-noxfile
|
|
27
|
+
Provides-Extra: dev-pylint
|
|
28
|
+
Provides-Extra: dev-pytest
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
|
|
32
|
+
# Frequenz Electricity Trading API Client
|
|
33
|
+
|
|
34
|
+
[](https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/actions/workflows/ci.yaml)
|
|
35
|
+
[](https://pypi.org/project/frequenz-client-electricity-trading/)
|
|
36
|
+
[](https://frequenz-floss.github.io/frequenz-client-electricity-trading-python/)
|
|
37
|
+
|
|
38
|
+
## Introduction
|
|
39
|
+
|
|
40
|
+
Electricity Trading API client for Python
|
|
41
|
+
|
|
42
|
+
## Supported Platforms
|
|
43
|
+
|
|
44
|
+
The following platforms are officially supported (tested):
|
|
45
|
+
|
|
46
|
+
- **Python:** 3.11
|
|
47
|
+
- **Operating System:** Ubuntu Linux 20.04
|
|
48
|
+
- **Architectures:** amd64, arm64
|
|
49
|
+
|
|
50
|
+
## Contributing
|
|
51
|
+
|
|
52
|
+
If you want to know how to build this project and contribute to it, please
|
|
53
|
+
check out the [Contributing Guide](CONTRIBUTING.md).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Frequenz Electricity Trading API Client
|
|
2
|
+
|
|
3
|
+
[](https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/actions/workflows/ci.yaml)
|
|
4
|
+
[](https://pypi.org/project/frequenz-client-electricity-trading/)
|
|
5
|
+
[](https://frequenz-floss.github.io/frequenz-client-electricity-trading-python/)
|
|
6
|
+
|
|
7
|
+
## Introduction
|
|
8
|
+
|
|
9
|
+
Electricity Trading API client for Python
|
|
10
|
+
|
|
11
|
+
## Supported Platforms
|
|
12
|
+
|
|
13
|
+
The following platforms are officially supported (tested):
|
|
14
|
+
|
|
15
|
+
- **Python:** 3.11
|
|
16
|
+
- **Operating System:** Ubuntu Linux 20.04
|
|
17
|
+
- **Architectures:** amd64, arm64
|
|
18
|
+
|
|
19
|
+
## Contributing
|
|
20
|
+
|
|
21
|
+
If you want to know how to build this project and contribute to it, please
|
|
22
|
+
check out the [Contributing Guide](CONTRIBUTING.md).
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Frequenz Electricity Trading API Client Release Notes
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
This is the first release of the Frequenz Electricity Trading API Client for Python on this repo. The code was imported from [frequenz-api-electricity-trading v0.1.3](https://github.com/frequenz-floss/frequenz-api-electricity-trading/releases/tag/v0.1.3), and some minor changes were made to adapt it to the updated dependencies.
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# License: MIT
|
|
2
|
+
# Copyright © 2024 Frequenz Energy-as-a-Service GmbH
|
|
3
|
+
|
|
4
|
+
[build-system]
|
|
5
|
+
requires = [
|
|
6
|
+
"setuptools == 68.1.0",
|
|
7
|
+
"setuptools_scm[toml] == 7.1.0",
|
|
8
|
+
"frequenz-repo-config[lib] == 0.9.1",
|
|
9
|
+
]
|
|
10
|
+
build-backend = "setuptools.build_meta"
|
|
11
|
+
|
|
12
|
+
[project]
|
|
13
|
+
name = "frequenz-client-electricity-trading"
|
|
14
|
+
description = "Electricity Trading API client for Python"
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
license = { text = "MIT" }
|
|
17
|
+
keywords = ["frequenz", "python", "lib", "library", "client-electricity-trading", "client", "api", "python", "trading", "electricity-trading"]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 3 - Alpha",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
24
|
+
"Topic :: Software Development :: Libraries",
|
|
25
|
+
"Typing :: Typed",
|
|
26
|
+
]
|
|
27
|
+
requires-python = ">= 3.11, < 4"
|
|
28
|
+
# TODO(cookiecutter): Remove and add more dependencies if appropriate
|
|
29
|
+
dependencies = [
|
|
30
|
+
"frequenz-api-common >= 0.5.3, < 0.7.0",
|
|
31
|
+
"googleapis-common-protos >= 1.56.4, < 2",
|
|
32
|
+
"grpcio >= 1.60.0, < 2",
|
|
33
|
+
"frequenz-channels >= 0.16.0, < 1.1.0",
|
|
34
|
+
"frequenz-client-base >= 0.1.0, < 0.4",
|
|
35
|
+
"frequenz-api-electricity-trading == 0.2.0",
|
|
36
|
+
]
|
|
37
|
+
dynamic = ["version"]
|
|
38
|
+
|
|
39
|
+
[[project.authors]]
|
|
40
|
+
name = "Frequenz Energy-as-a-Service GmbH"
|
|
41
|
+
email = "floss@frequenz.com"
|
|
42
|
+
|
|
43
|
+
# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
|
|
44
|
+
[project.optional-dependencies]
|
|
45
|
+
dev-flake8 = [
|
|
46
|
+
"flake8 == 7.0.0",
|
|
47
|
+
"flake8-docstrings == 1.7.0",
|
|
48
|
+
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
|
|
49
|
+
"pydoclint == 0.4.1",
|
|
50
|
+
"pydocstyle == 6.3.0",
|
|
51
|
+
]
|
|
52
|
+
dev-formatting = ["black == 24.4.0", "isort == 5.13.2"]
|
|
53
|
+
dev-mkdocs = [
|
|
54
|
+
"black == 24.4.0",
|
|
55
|
+
"Markdown==3.6",
|
|
56
|
+
"mike == 2.0.0",
|
|
57
|
+
"mkdocs-gen-files == 0.5.0",
|
|
58
|
+
"mkdocs-literate-nav == 0.6.1",
|
|
59
|
+
"mkdocs-macros-plugin == 1.0.5",
|
|
60
|
+
"mkdocs-material == 9.5.18",
|
|
61
|
+
"mkdocstrings[python] == 0.24.3",
|
|
62
|
+
"frequenz-repo-config[lib] == 0.9.1",
|
|
63
|
+
]
|
|
64
|
+
dev-mypy = [
|
|
65
|
+
"mypy == 1.9.0",
|
|
66
|
+
"grpc-stubs == 1.53.0.5",
|
|
67
|
+
"types-Markdown == 3.6.0.20240316",
|
|
68
|
+
# For checking the noxfile, docs/ script, and tests
|
|
69
|
+
"frequenz-client-electricity-trading[dev-mkdocs,dev-noxfile,dev-pytest]",
|
|
70
|
+
]
|
|
71
|
+
dev-noxfile = [
|
|
72
|
+
"nox == 2024.4.15",
|
|
73
|
+
"frequenz-repo-config[lib] == 0.9.1",
|
|
74
|
+
]
|
|
75
|
+
dev-pylint = [
|
|
76
|
+
"pylint == 3.1.0",
|
|
77
|
+
# For checking the noxfile, docs/ script, and tests
|
|
78
|
+
"frequenz-client-electricity-trading[dev-mkdocs,dev-noxfile,dev-pytest]",
|
|
79
|
+
]
|
|
80
|
+
dev-pytest = [
|
|
81
|
+
"pytest == 8.1.1",
|
|
82
|
+
"frequenz-repo-config[extra-lint-examples] == 0.9.1",
|
|
83
|
+
"pytest-mock == 3.14.0",
|
|
84
|
+
"pytest-asyncio == 0.23.6",
|
|
85
|
+
"async-solipsism == 0.6",
|
|
86
|
+
"deepdiff == 7.0.1",
|
|
87
|
+
]
|
|
88
|
+
dev = [
|
|
89
|
+
"frequenz-client-electricity-trading[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
[project.urls]
|
|
93
|
+
Documentation = "https://frequenz-floss.github.io/frequenz-client-electricity-trading-python/"
|
|
94
|
+
Changelog = "https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/releases"
|
|
95
|
+
Issues = "https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/issues"
|
|
96
|
+
Repository = "https://github.com/frequenz-floss/frequenz-client-electricity-trading-python"
|
|
97
|
+
Support = "https://github.com/frequenz-floss/frequenz-client-electricity-trading-python/discussions/categories/support"
|
|
98
|
+
|
|
99
|
+
[tool.black]
|
|
100
|
+
line-length = 88
|
|
101
|
+
target-version = ['py311']
|
|
102
|
+
include = '\.pyi?$'
|
|
103
|
+
|
|
104
|
+
[tool.isort]
|
|
105
|
+
profile = "black"
|
|
106
|
+
line_length = 88
|
|
107
|
+
src_paths = ["benchmarks", "examples", "src", "tests"]
|
|
108
|
+
|
|
109
|
+
[tool.flake8]
|
|
110
|
+
# We give some flexibility to go over 88, there are cases like long URLs or
|
|
111
|
+
# code in documenation that have extra indentation. Black will still take care
|
|
112
|
+
# of making everything that can be 88 wide, 88 wide.
|
|
113
|
+
max-line-length = 100
|
|
114
|
+
extend-ignore = [
|
|
115
|
+
"E203", # Whitespace before ':' (conflicts with black)
|
|
116
|
+
"W503", # Line break before binary operator (conflicts with black)
|
|
117
|
+
]
|
|
118
|
+
# pydoclint options
|
|
119
|
+
style = "google"
|
|
120
|
+
check-return-types = false
|
|
121
|
+
check-yield-types = false
|
|
122
|
+
arg-type-hints-in-docstring = false
|
|
123
|
+
arg-type-hints-in-signature = true
|
|
124
|
+
allow-init-docstring = true
|
|
125
|
+
|
|
126
|
+
[tool.pylint.similarities]
|
|
127
|
+
ignore-comments = ['yes']
|
|
128
|
+
ignore-docstrings = ['yes']
|
|
129
|
+
ignore-imports = ['no']
|
|
130
|
+
min-similarity-lines = 40
|
|
131
|
+
|
|
132
|
+
[tool.pylint.messages_control]
|
|
133
|
+
disable = [
|
|
134
|
+
"too-few-public-methods",
|
|
135
|
+
"too-many-return-statements",
|
|
136
|
+
# disabled because it conflicts with isort
|
|
137
|
+
"wrong-import-order",
|
|
138
|
+
"ungrouped-imports",
|
|
139
|
+
# pylint's unsubscriptable check is buggy and is not needed because
|
|
140
|
+
# it is a type-check, for which we already have mypy.
|
|
141
|
+
"unsubscriptable-object",
|
|
142
|
+
# Checked by flake8
|
|
143
|
+
"line-too-long",
|
|
144
|
+
"redefined-outer-name",
|
|
145
|
+
"unnecessary-lambda-assignment",
|
|
146
|
+
"unused-import",
|
|
147
|
+
"unused-variable",
|
|
148
|
+
]
|
|
149
|
+
|
|
150
|
+
[tool.pytest.ini_options]
|
|
151
|
+
testpaths = ["tests", "src"]
|
|
152
|
+
asyncio_mode = "auto"
|
|
153
|
+
required_plugins = ["pytest-asyncio", "pytest-mock"]
|
|
154
|
+
|
|
155
|
+
[tool.mypy]
|
|
156
|
+
explicit_package_bases = true
|
|
157
|
+
namespace_packages = true
|
|
158
|
+
# This option disables mypy cache, and it is sometimes useful to enable it if
|
|
159
|
+
# you are getting weird intermittent error, or error in the CI but not locally
|
|
160
|
+
# (or vice versa). In particular errors saying that type: ignore is not
|
|
161
|
+
# used but getting the original ignored error when removing the type: ignore.
|
|
162
|
+
# See for example: https://github.com/python/mypy/issues/2960
|
|
163
|
+
#no_incremental = true
|
|
164
|
+
packages = ["frequenz.client.electricity_trading"]
|
|
165
|
+
strict = true
|
|
166
|
+
|
|
167
|
+
[[tool.mypy.overrides]]
|
|
168
|
+
module = ["mkdocs_macros.*", "sybil", "sybil.*", "deepdiff"]
|
|
169
|
+
ignore_missing_imports = true
|
|
170
|
+
|
|
171
|
+
[tool.setuptools_scm]
|
|
172
|
+
version_scheme = "post-release"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# License: MIT
|
|
2
|
+
# Copyright © 2024 Frequenz Energy-as-a-Service GmbH
|
|
3
|
+
|
|
4
|
+
"""Electricity Trading API client for Python."""
|
|
5
|
+
|
|
6
|
+
from ._client import Client
|
|
7
|
+
from ._types import (
|
|
8
|
+
Currency,
|
|
9
|
+
DeliveryArea,
|
|
10
|
+
DeliveryDuration,
|
|
11
|
+
DeliveryPeriod,
|
|
12
|
+
Energy,
|
|
13
|
+
EnergyMarketCodeType,
|
|
14
|
+
GridpoolOrderFilter,
|
|
15
|
+
GridpoolTradeFilter,
|
|
16
|
+
MarketActor,
|
|
17
|
+
MarketSide,
|
|
18
|
+
Order,
|
|
19
|
+
OrderDetail,
|
|
20
|
+
OrderExecutionOption,
|
|
21
|
+
OrderState,
|
|
22
|
+
OrderType,
|
|
23
|
+
PaginationParams,
|
|
24
|
+
Price,
|
|
25
|
+
PublicTrade,
|
|
26
|
+
PublicTradeFilter,
|
|
27
|
+
StateDetail,
|
|
28
|
+
StateReason,
|
|
29
|
+
Trade,
|
|
30
|
+
TradeState,
|
|
31
|
+
UpdateOrder,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
__all__ = [
|
|
35
|
+
"Client",
|
|
36
|
+
"Currency",
|
|
37
|
+
"DeliveryArea",
|
|
38
|
+
"DeliveryDuration",
|
|
39
|
+
"DeliveryPeriod",
|
|
40
|
+
"Energy",
|
|
41
|
+
"EnergyMarketCodeType",
|
|
42
|
+
"GridpoolOrderFilter",
|
|
43
|
+
"GridpoolTradeFilter",
|
|
44
|
+
"MarketSide",
|
|
45
|
+
"MarketActor",
|
|
46
|
+
"Order",
|
|
47
|
+
"OrderDetail",
|
|
48
|
+
"OrderExecutionOption",
|
|
49
|
+
"OrderState",
|
|
50
|
+
"OrderType",
|
|
51
|
+
"PaginationParams",
|
|
52
|
+
"Price",
|
|
53
|
+
"PublicTrade",
|
|
54
|
+
"PublicTradeFilter",
|
|
55
|
+
"UpdateOrder",
|
|
56
|
+
"StateDetail",
|
|
57
|
+
"StateReason",
|
|
58
|
+
"Trade",
|
|
59
|
+
"TradeState",
|
|
60
|
+
]
|