eptr2 1.2.1.dev2__tar.gz → 1.3.9.dev2__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.
Files changed (128) hide show
  1. eptr2-1.2.1.dev2/PKG-INFO → eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12/README.md +139 -28
  2. eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12/docs/assets/README.md +24 -0
  3. eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12/examples/README.md +150 -0
  4. eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12/pyproject.toml +59 -0
  5. eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12/src/eptr2/mcp/README.md +303 -0
  6. eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12/tutorials/README.md +71 -0
  7. eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12/tutorials/pyproject.toml +21 -0
  8. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2}/.gitignore +3 -1
  9. eptr2-1.3.9.dev2/LICENSE +201 -0
  10. eptr2-1.3.9.dev2/PKG-INFO +120 -0
  11. eptr2-1.3.9.dev2/README.md +86 -0
  12. eptr2-1.3.9.dev2/docs/assets/README.md +24 -0
  13. eptr2-1.3.9.dev2/examples/README.md +150 -0
  14. eptr2-1.3.9.dev2/pyproject.toml +60 -0
  15. eptr2-1.3.9.dev2/src/eptr2/__init__.py +37 -0
  16. eptr2-1.3.9.dev2/src/eptr2/__main__.py +6 -0
  17. eptr2-1.3.9.dev2/src/eptr2/agentic/__init__.py +44 -0
  18. eptr2-1.3.9.dev2/src/eptr2/agentic/discovery.py +109 -0
  19. eptr2-1.3.9.dev2/src/eptr2/agentic/schema.py +153 -0
  20. eptr2-1.3.9.dev2/src/eptr2/agentic/skills.py +99 -0
  21. eptr2-1.3.9.dev2/src/eptr2/assets/__init__.py +1 -0
  22. eptr2-1.3.9.dev2/src/eptr2/assets/eptr2_api_schema.json +4677 -0
  23. eptr2-1.3.9.dev2/src/eptr2/assets/mcp.json +9 -0
  24. eptr2-1.3.9.dev2/src/eptr2/assets/plugin.json +22 -0
  25. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-api-discovery/SKILL.md +203 -0
  26. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-api-discovery/endpoint-categories.md +211 -0
  27. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-api-discovery/scripts/list_endpoints.py +59 -0
  28. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-consumption-data/SKILL.md +155 -0
  29. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-consumption-data/examples.md +249 -0
  30. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-convenience-wrappers/SKILL.md +318 -0
  31. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-generation-tracking/SKILL.md +177 -0
  32. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-generation-tracking/examples.md +252 -0
  33. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-imbalance-costs/SKILL.md +186 -0
  34. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-imbalance-costs/examples.md +280 -0
  35. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-imbalance-costs/formulas.md +266 -0
  36. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-market-operations/SKILL.md +201 -0
  37. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-market-operations/examples.md +236 -0
  38. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-price-analysis/SKILL.md +123 -0
  39. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-price-analysis/api-reference.md +173 -0
  40. eptr2-1.3.9.dev2/src/eptr2/assets/skills/eptr2-price-analysis/examples.md +233 -0
  41. eptr2-1.3.9.dev2/src/eptr2/calls/__init__.py +260 -0
  42. eptr2-1.3.9.dev2/src/eptr2/calls/ancillary.py +83 -0
  43. eptr2-1.3.9.dev2/src/eptr2/calls/bilateral.py +64 -0
  44. eptr2-1.3.9.dev2/src/eptr2/calls/bpm.py +90 -0
  45. eptr2-1.3.9.dev2/src/eptr2/calls/consumption.py +415 -0
  46. eptr2-1.3.9.dev2/src/eptr2/calls/dam.py +337 -0
  47. eptr2-1.3.9.dev2/src/eptr2/calls/dams.py +197 -0
  48. eptr2-1.3.9.dev2/src/eptr2/calls/general.py +111 -0
  49. eptr2-1.3.9.dev2/src/eptr2/calls/generation.py +275 -0
  50. eptr2-1.3.9.dev2/src/eptr2/calls/idm.py +159 -0
  51. eptr2-1.3.9.dev2/src/eptr2/calls/imbalance.py +83 -0
  52. eptr2-1.3.9.dev2/src/eptr2/calls/mms.py +102 -0
  53. eptr2-1.3.9.dev2/src/eptr2/calls/ng_general.py +45 -0
  54. eptr2-1.3.9.dev2/src/eptr2/calls/ng_sgp.py +505 -0
  55. eptr2-1.3.9.dev2/src/eptr2/calls/ng_transmission.py +292 -0
  56. eptr2-1.3.9.dev2/src/eptr2/calls/ng_vgp.py +334 -0
  57. eptr2-1.3.9.dev2/src/eptr2/calls/renewables.py +235 -0
  58. eptr2-1.3.9.dev2/src/eptr2/calls/reporting.py +128 -0
  59. eptr2-1.3.9.dev2/src/eptr2/calls/retroactive.py +159 -0
  60. eptr2-1.3.9.dev2/src/eptr2/calls/transmission.py +273 -0
  61. eptr2-1.3.9.dev2/src/eptr2/calls/vep.py +235 -0
  62. eptr2-1.3.9.dev2/src/eptr2/calls/yek_g.py +197 -0
  63. eptr2-1.3.9.dev2/src/eptr2/cli.py +388 -0
  64. eptr2-1.3.9.dev2/src/eptr2/composite/__init__.py +11 -0
  65. eptr2-1.3.9.dev2/src/eptr2/composite/ancillary.py +72 -0
  66. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/composite/bpm.py +40 -34
  67. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/composite/consumption.py +14 -6
  68. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/composite/dabi_idm.py +112 -111
  69. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/composite/idm_log.py +34 -28
  70. eptr2-1.3.9.dev2/src/eptr2/composite/ids.py +88 -0
  71. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/composite/mms.py +12 -4
  72. eptr2-1.3.9.dev2/src/eptr2/composite/periodic_orgs.py +258 -0
  73. eptr2-1.3.9.dev2/src/eptr2/composite/plant_costs.py +702 -0
  74. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/composite/price_and_cost.py +82 -15
  75. eptr2-1.3.9.dev2/src/eptr2/composite/production.py +523 -0
  76. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/main.py +223 -60
  77. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/mapping/checks.py +9 -6
  78. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/mapping/help.py +4 -16
  79. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/mapping/parameters.py +6 -3
  80. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/mapping/path.py +20 -3
  81. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/mapping/processing.py +3 -0
  82. eptr2-1.3.9.dev2/src/eptr2/mcp/README.md +352 -0
  83. eptr2-1.3.9.dev2/src/eptr2/mcp/__init__.py +5 -0
  84. eptr2-1.3.9.dev2/src/eptr2/mcp/server.py +384 -0
  85. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/processing/postprocess/items.py +5 -1
  86. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/processing/preprocess/params.py +7 -0
  87. eptr2-1.3.9.dev2/src/eptr2/util/costs.py +2487 -0
  88. eptr2-1.3.9.dev2/src/eptr2/util/time.py +1338 -0
  89. eptr2-1.3.9.dev2/tutorials/README.md +71 -0
  90. eptr2-1.3.9.dev2/tutorials/pyproject.toml +21 -0
  91. eptr2-1.2.1.dev2/README.md +0 -275
  92. eptr2-1.2.1.dev2/creds/eptr_credentials.json +0 -9
  93. eptr2-1.2.1.dev2/eptr2/__init__.py +0 -6
  94. eptr2-1.2.1.dev2/eptr2/composite/__init__.py +0 -8
  95. eptr2-1.2.1.dev2/eptr2/composite/plant_costs.py +0 -142
  96. eptr2-1.2.1.dev2/eptr2/composite/production.py +0 -376
  97. eptr2-1.2.1.dev2/eptr2/tutorials/__init__.py +0 -3
  98. eptr2-1.2.1.dev2/eptr2/tutorials/calc.py +0 -269
  99. eptr2-1.2.1.dev2/eptr2/tutorials/composite/__init__.py +0 -11
  100. eptr2-1.2.1.dev2/eptr2/tutorials/composite/common.py +0 -28
  101. eptr2-1.2.1.dev2/eptr2/tutorials/composite/pages/1_/360/237/221/251/342/200/215/360/237/222/273_Demo.py +0 -219
  102. eptr2-1.2.1.dev2/eptr2/tutorials/composite/pages/2_/360/237/224/256_Pozisyonlar.py +0 -147
  103. eptr2-1.2.1.dev2/eptr2/tutorials/composite/pages/3_/342/232/241/357/270/217_/303/234retim_Planlama.py +0 -233
  104. eptr2-1.2.1.dev2/eptr2/tutorials/composite/pages/4_/360/237/222/260_Fiyat_ve_Maliyetler.py +0 -145
  105. eptr2-1.2.1.dev2/eptr2/tutorials/composite/pages/5_/360/237/222/270_Santral_Dengesizlik.py +0 -514
  106. eptr2-1.2.1.dev2/eptr2/tutorials/composite/pages/6_/360/237/221/250/342/200/215/360/237/222/273_Yeni_Dengesizlik_Hesab/304/261.py +0 -71
  107. eptr2-1.2.1.dev2/eptr2/tutorials/composite//342/255/220/357/270/217_Ana_Sayfa.py +0 -161
  108. eptr2-1.2.1.dev2/eptr2/tutorials/demo.py +0 -218
  109. eptr2-1.2.1.dev2/eptr2/tutorials/main.py +0 -33
  110. eptr2-1.2.1.dev2/eptr2/util/costs.py +0 -431
  111. eptr2-1.2.1.dev2/eptr2/util/time.py +0 -536
  112. eptr2-1.2.1.dev2/pyproject.toml +0 -40
  113. eptr2-1.2.1.dev2/tests/__init__.py +0 -5
  114. eptr2-1.2.1.dev2/tests/composite/__init__.py +0 -0
  115. eptr2-1.2.1.dev2/tests/composite/test_consumption.py +0 -32
  116. eptr2-1.2.1.dev2/tests/composite/test_mms.py +0 -37
  117. eptr2-1.2.1.dev2/tests/composite/test_price_and_cost.py +0 -57
  118. eptr2-1.2.1.dev2/tests/composite/test_production.py +0 -34
  119. eptr2-1.2.1.dev2/uv.lock +0 -1291
  120. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/.claude/worktrees/wonderful-knuth-6c1f12}/LICENSE +0 -0
  121. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/mapping/__init__.py +0 -0
  122. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/processing/__init__.py +0 -0
  123. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/processing/postprocess/__init__.py +0 -0
  124. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/processing/preprocess/__init__.py +0 -0
  125. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/processing/preprocess/calls.py +0 -0
  126. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/util/__init__.py +0 -0
  127. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/util/certificate.py +0 -0
  128. {eptr2-1.2.1.dev2 → eptr2-1.3.9.dev2/src}/eptr2/util/evaluation.py +0 -0
@@ -1,26 +1,11 @@
1
- Metadata-Version: 2.4
2
- Name: eptr2
3
- Version: 1.2.1.dev2
4
- Summary: EPIAS Transparency Platform v2.0 Python client by Robokami Data
5
- Author-email: Tideseed <info@tideseed.com>
6
- License: Apache License 2.0
7
- License-File: LICENSE
8
- Requires-Python: !=3.9.7,>=3.9.6
9
- Requires-Dist: pytz>=2024.1
10
- Requires-Dist: urllib3==2.5.0
11
- Provides-Extra: allextras
12
- Requires-Dist: pandas>=2.1.3; extra == 'allextras'
13
- Requires-Dist: requests>=2.32.4; extra == 'allextras'
14
- Requires-Dist: streamlit>=1.48.0; extra == 'allextras'
15
- Requires-Dist: tornado>=6.5.0; extra == 'allextras'
16
- Provides-Extra: dataframe
17
- Requires-Dist: pandas>=2.1.3; extra == 'dataframe'
18
- Provides-Extra: dev
19
- Requires-Dist: pytest>=7.4.0; extra == 'dev'
20
- Requires-Dist: python-dotenv>=0.19.1; extra == 'dev'
21
- Description-Content-Type: text/markdown
22
-
23
- ![PyPI - Version](https://img.shields.io/pypi/v/eptr2) ![PyPI - Downloads](https://img.shields.io/pypi/dm/eptr2)
1
+ ![PyPI - Version](https://img.shields.io/pypi/v/eptr2) ![PyPI - Downloads](https://img.shields.io/pypi/dm/eptr2) ![PyPI - Python Version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ftideseed%2Feptr2%2Fmain%2Fpyproject.toml
2
+ ) ![PyPI - License](https://img.shields.io/pypi/l/eptr2)
3
+
4
+ **!! IMPORTANT: Starting from 1.3.3 there will be some breaking changes due to regulatory changes by EPDK. Overhaul is planned to finish with the next mid release 1.4.0**
5
+
6
+ **!! CRITICAL: Due to authentication method changes you are strongly recommended to update the eptr2 version to 1.2.4+**
7
+
8
+ **Note: From 1.3.0 and onwards, eptr2 starts to evolve to be an AI oriented tool. You can use it as an MCP server, directly use them in your LLMs and AI agents to write your code for you.**
24
9
 
25
10
  # Quickstart
26
11
 
@@ -29,18 +14,37 @@ This document is a quickstart guide for `eptr2` package. It is a Python client f
29
14
  + For live demo, please visit <https://eptr2demo.streamlit.app/>
30
15
  + For local demo, you can run `eptr2demo` at terminal after installing the library.
31
16
 
17
+
18
+ # MCP Server Quick Reference
19
+
20
+ + You can use Claude Desktop configuration to connect to the MCP server in VS Code as well. See Claude Desktop configuration details [here](https://modelcontextprotocol.io/docs/develop/connect-local-servers).
21
+ + Make sure in VS Code settings `chat.mcp.discovery.enabled` is enabled and `chat.mcp.access` is set to the correct value. See details in [VS Code documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).
22
+
23
+
32
24
  ## Installation
33
25
 
34
- You can easily install it from PyPI with the following commmand.
26
+ RECOMMENDED: Install `eptr2` with "allextras" option to get additional features. Extras currently include `pandas` and `streamlit` libraries. You can install the package with the following command.
27
+
28
+ ```bash
29
+ pip install "eptr2[allextras]"
30
+ ```
31
+
32
+ **Note:** The `[allextras]` option includes MCP server support for AI agent integration, along with pandas and streamlit.
33
+
34
+ Otherwise you can easily install it from PyPI with the following commmand.
35
35
 
36
36
  ```bash
37
37
  pip install eptr2
38
38
  ```
39
39
 
40
- If you want to the additional features, it is recommended to install it with the extras. Extras currently include `pandas` and `streamlit`. You can install the package with the following command.
40
+ You can also use `uv` tool to install the package with extras or plain.
41
41
 
42
42
  ```bash
43
- pip install "eptr2[allextras]"
43
+ uv pip install "eptr2[allextras]"
44
+ ```
45
+
46
+ ```bash
47
+ uv pip install eptr2
44
48
  ```
45
49
 
46
50
  ## Usage
@@ -61,7 +65,34 @@ res = eptr.call("mcp", start_date="2024-07-29", end_date="2024-07-29")
61
65
 
62
66
  There are more than 213 calls available. You can search for available calls with `eptr.get_available_calls()` function. This is almost an exhaustive list of available calls in the platform currently.
63
67
 
64
- ### New Login Method
68
+
69
+ ### Alternative: Using .env file for credentials and TGT recycling
70
+
71
+ Starting from version `1.2.3`, you can use ".env" file to store credentials and recycle TGT (Ticket Granting Ticket) automatically. Recycling TGT allows you to create wrapper functions without the need to carry `EPTR2` object directly or having to create TGTs for each call (which may be throttled). TGT information is stored in the target path (default is current directory) under the file name `.eptr2-tgt` and reused until it expires.
72
+
73
+ ```python
74
+ from eptr2 import EPTR2
75
+
76
+ eptr = EPTR2(
77
+ use_dotenv=True, ## Default: True
78
+ recycle_tgt=True, ## Default: False
79
+ dotenv_path=".env" ## Default: "".env"
80
+ tgt_path="." ## Default: ".", included as a kwarg
81
+ )
82
+
83
+ df = eptr.call("mcp", start_date="2025-08-01",end_date="2025-08-31")
84
+ ```
85
+
86
+ `.env` file is simply a text file with the following content. You need to create it in the same directory where you run your script.
87
+
88
+ ```
89
+ EPTR_USERNAME=youremail@something.com
90
+ EPTR_PASSWORD=yourpassword
91
+ ```
92
+
93
+ ### Deprecated: Credentials JSON
94
+
95
+ *This method is being deprecated and will be removed soon.*
65
96
 
66
97
  From eptr2 version 1.1.0, you can use a new login method that automatically handles TGT (Ticket Granting Ticket) management. This way, TGT is automatically renewed when it expires, and credentials are loaded from a file or environment variables. You need a credentials file (e.g. `creds/eptr_credentials.json`) with the following structure:
67
98
 
@@ -115,6 +146,73 @@ run_calc_app(username="YOUR_USERNAME",password="YOUR_PASSWORD")
115
146
 
116
147
  _More tutorials are expected to be added in the future._
117
148
 
149
+ ## AI Agent Integration (MCP Server)
150
+
151
+ Starting from version 1.2.4, `eptr2` includes a Model Context Protocol (MCP) server for AI agent integration. This allows AI assistants like Claude to directly query Turkish electricity market data.
152
+
153
+ ### Quick Start
154
+
155
+ Install with all extras (includes MCP support):
156
+
157
+ ```bash
158
+ pip install "eptr2[allextras]"
159
+ ```
160
+
161
+ Run the MCP server:
162
+
163
+ ```bash
164
+ eptr2-mcp-server
165
+ ```
166
+
167
+ Or programmatically:
168
+
169
+ ```python
170
+ from eptr2.mcp import run_mcp_server
171
+ import asyncio
172
+
173
+ asyncio.run(run_mcp_server(use_dotenv=True, recycle_tgt=True))
174
+ ```
175
+
176
+ ### Configuration
177
+
178
+ Create a `.env` file with your credentials:
179
+
180
+ ```env
181
+ EPTR_USERNAME=your.email@example.com
182
+ EPTR_PASSWORD=yourpassword
183
+ ```
184
+
185
+ For Claude Desktop integration, add to your config file:
186
+
187
+ ```json
188
+ {
189
+ "mcpServers": {
190
+ "eptr2": {
191
+ "command": "eptr2-mcp-server",
192
+ "env": {
193
+ "EPTR_USERNAME": "your.email@example.com",
194
+ "EPTR_PASSWORD": "yourpassword"
195
+ }
196
+ }
197
+ }
198
+ }
199
+ ```
200
+
201
+ ### Available MCP Tools
202
+
203
+ The server exposes 10 tools for querying electricity market data:
204
+ - Market Clearing Price (MCP/PTF)
205
+ - System Marginal Price (SMP/SMF)
206
+ - Real-time Consumption and Generation
207
+ - Demand Forecasts
208
+ - Imbalance Prices
209
+ - Generic API calls (213+ endpoints)
210
+ - Composite data functions
211
+
212
+ For complete Claude Desktop setup, see [CLAUDE_SETUP.md](CLAUDE_SETUP.md).
213
+
214
+ For AI agent reference documentation, see [AGENTS.md](AGENTS.md) and [src/eptr2/mcp/README.md](src/eptr2/mcp/README.md).
215
+
118
216
  # About EPIAS Transparency Platform v2.0 Python client by Robokami Data
119
217
 
120
218
  🇬🇧 `eptr2` (**EP**IAS **Tr**ansparency **2**.0) package is a thin wrapper around [EPIAS Transparency Platform v2.0](https://seffaflik.epias.com.tr/home) API brought to you by [Robokami](https://robokami.com). It is an unofficial package with Apache License 2.0 (free and permissable use for commercial applications, [see details](https://www.tldrlegal.com/license/apache-license-2-0-apache-2-0)). `eptr2` accesses currently more than 213 services with convenience methods.
@@ -294,4 +392,17 @@ df = gather_and_calculate_plant_costs(
294
392
  forecast_source = "kgup",
295
393
  actual_source = "uevm"
296
394
  )
297
- ```
395
+ ```
396
+
397
+ ### Bulk Function Calls
398
+
399
+ There are three bulk function calls for daily operations: daily production plan (DPP/KGÜP), real time generation and uevcb ids.
400
+
401
+ ```python
402
+ ### DPP / KGÜP bulk
403
+ dpp_df = eptr.call("dpp-bulk", date="2025-08-31", uevcb_ids=[3208611, 723724, 335505, 106710, 4094])
404
+ ### Real Time Generation bulk
405
+ rt_gen_df = eptr.call("rt-gen-bulk", date="2025-08-31", pp_ids=[11162, 17889, 605, 5005121, 20764])
406
+ ### UEVCB list bulk
407
+ uevcb_df = eptr.call("uevcb-list-bulk", date="2025-08-31", org_ids=[166, 12297, 648, 19880, 162])
408
+ ```
@@ -0,0 +1,24 @@
1
+ # Documentation Assets
2
+
3
+ This directory contains assets for the MkDocs documentation.
4
+
5
+ ## Required Files
6
+
7
+ - `logo.png` - Logo image for the documentation header (recommended: 48x48 or 64x64 pixels)
8
+ - `favicon.ico` - Browser favicon
9
+
10
+ ## Generating Placeholder Logo
11
+
12
+ If you don't have a logo yet, you can create a simple placeholder:
13
+
14
+ ```python
15
+ # Using Pillow
16
+ from PIL import Image, ImageDraw, ImageFont
17
+
18
+ img = Image.new('RGB', (64, 64), color='#4F46E5')
19
+ d = ImageDraw.Draw(img)
20
+ d.text((12, 16), "E2", fill='white')
21
+ img.save('logo.png')
22
+ ```
23
+
24
+ Or simply use any 64x64 PNG image as a placeholder.
@@ -0,0 +1,150 @@
1
+ # EPTR2 Examples
2
+
3
+ This directory contains example scripts demonstrating how to use the eptr2 library, both for direct usage and for AI agent integration via MCP (Model Context Protocol).
4
+
5
+ ## Files
6
+
7
+ ### 1. `basic_usage.py`
8
+ Demonstrates basic usage patterns for the eptr2 library:
9
+ - Basic price queries (MCP, SMP)
10
+ - Multiple data source queries
11
+ - Composite functions
12
+ - Discovery of available API calls
13
+ - Generation data queries
14
+ - Error handling
15
+
16
+ **Run it:**
17
+ ```bash
18
+ python examples/basic_usage.py
19
+ ```
20
+
21
+ **Requirements:**
22
+ - Create a `.env` file with your EPIAS credentials:
23
+ ```
24
+ EPTR_USERNAME=your.email@example.com
25
+ EPTR_PASSWORD=yourpassword
26
+ ```
27
+
28
+ ### 2. `mcp_server_example.py`
29
+ Shows how to set up and use the MCP server for AI agent integration:
30
+ - MCP server configuration
31
+ - Available tools documentation
32
+ - Example AI agent queries
33
+ - Claude Desktop integration
34
+
35
+ **View information:**
36
+ ```bash
37
+ python examples/mcp_server_example.py
38
+ ```
39
+
40
+ **Run the MCP server:**
41
+ ```bash
42
+ python examples/mcp_server_example.py --run
43
+ ```
44
+
45
+ Or simply:
46
+ ```bash
47
+ eptr2-mcp-server
48
+ ```
49
+
50
+ ## Quick Start
51
+
52
+ ### For Direct Library Usage
53
+
54
+ 1. Install eptr2:
55
+ ```bash
56
+ pip install "eptr2[allextras]"
57
+ ```
58
+
59
+ 2. Create `.env` file:
60
+ ```
61
+ EPTR_USERNAME=your.email@example.com
62
+ EPTR_PASSWORD=yourpassword
63
+ ```
64
+
65
+ 3. Run examples:
66
+ ```bash
67
+ python examples/basic_usage.py
68
+ ```
69
+
70
+ ### For AI Agent Integration
71
+
72
+ 1. Install with MCP support:
73
+ ```bash
74
+ pip install "eptr2[allextras,mcp]"
75
+ ```
76
+
77
+ 2. Create `.env` file (same as above)
78
+
79
+ 3. View MCP configuration:
80
+ ```bash
81
+ python examples/mcp_server_example.py
82
+ ```
83
+
84
+ 4. Run MCP server:
85
+ ```bash
86
+ eptr2-mcp-server
87
+ ```
88
+
89
+ 5. Configure your AI assistant (e.g., Claude Desktop) to connect to the server
90
+
91
+ ## Common Use Cases
92
+
93
+ ### Get Market Prices
94
+ ```python
95
+ from eptr2 import EPTR2
96
+
97
+ eptr = EPTR2(use_dotenv=True, recycle_tgt=True)
98
+ mcp = eptr.call("mcp", start_date="2024-07-29", end_date="2024-07-29")
99
+ ```
100
+
101
+ ### Get Consumption Data
102
+ ```python
103
+ consumption = eptr.call("rt-cons", start_date="2024-07-29", end_date="2024-07-29")
104
+ ```
105
+
106
+ ### Use Composite Functions
107
+ ```python
108
+ from eptr2.composite import get_hourly_price_and_cost_data
109
+
110
+ df = get_hourly_price_and_cost_data(
111
+ eptr,
112
+ start_date="2024-07-01",
113
+ end_date="2024-07-31"
114
+ )
115
+ ```
116
+
117
+ ### Discover Available APIs
118
+ ```python
119
+ calls = eptr.get_available_calls(include_aliases=True)
120
+ print(f"Total calls: {len(calls['keys'])}")
121
+ ```
122
+
123
+ ## Resources
124
+
125
+ - **Main Documentation**: [../README.md](../README.md)
126
+ - **Agent Guide**: [../AGENT_GUIDE.md](../AGENT_GUIDE.md)
127
+ - **Quick Reference**: [../QUICK_REFERENCE.md](../QUICK_REFERENCE.md)
128
+ - **MCP Documentation**: [../src/eptr2/mcp/README.md](../src/eptr2/mcp/README.md)
129
+ - **API Schema**: [../eptr2_api_schema.json](../eptr2_api_schema.json)
130
+
131
+ ## Troubleshooting
132
+
133
+ ### Authentication Errors
134
+ - Verify your EPIAS credentials
135
+ - Check that `.env` file is in the correct location
136
+ - Ensure `use_dotenv=True` is set
137
+
138
+ ### Import Errors
139
+ - Make sure eptr2 is installed: `pip install eptr2`
140
+ - For all features: `pip install "eptr2[allextras]"`
141
+ - For MCP support: `pip install "eptr2[mcp]"`
142
+
143
+ ### MCP Server Issues
144
+ - Verify FastMCP is installed: `pip install fastmcp`
145
+ - Check Python version (>=3.10 required)
146
+ - Ensure credentials are properly configured
147
+
148
+ ## License
149
+
150
+ Apache License 2.0 - Same as the eptr2 library
@@ -0,0 +1,59 @@
1
+ [project]
2
+ name = "eptr2"
3
+ version = "1.3.8"
4
+ description = "EPIAS Transparency Platform v2.0 Python client by Robokami / Tideseed"
5
+ authors = [{ name = "Tideseed", email = "info@tideseed.com" }]
6
+ license = { text = "Apache License 2.0" }
7
+ readme = "README.md"
8
+ requires-python = ">=3.10"
9
+ dependencies = ["urllib3>=2.6.3", "pytz>=2024.1"]
10
+
11
+
12
+ [project.urls]
13
+ Homepage = "https://github.com/Tideseed/eptr2"
14
+ Documentation = "https://tideseed.github.io/eptr2/"
15
+ Repository = "https://github.com/Tideseed/eptr2.git"
16
+ Issues = "https://github.com/Tideseed/eptr2/issues"
17
+ Changelog = "https://github.com/Tideseed/eptr2/blob/main/CHANGELOG.md"
18
+
19
+
20
+ [project.optional-dependencies]
21
+ dataframe = ["pandas>=2.1.3"]
22
+ mcp = ["fastmcp>=3.3.1", "pandas>=2.1.3", "xlsxwriter>=3.2.9"]
23
+ allextras = [
24
+ "pandas>=2.1.3",
25
+ "xlsxwriter>=3.2.9",
26
+ "openpyxl>=3.1.5",
27
+ "fastmcp>=3.3.1",
28
+ ]
29
+ docs = [
30
+ "mkdocs-material>=9.5.0",
31
+ "mkdocstrings[python]>=0.24.0",
32
+ "mkdocs-autorefs>=0.5.0",
33
+ ]
34
+ dev = ["pytest>=9.0.3"]
35
+
36
+ [project.scripts]
37
+ eptr2-mcp-server = "eptr2.mcp.server:main"
38
+
39
+ [build-system]
40
+ requires = ["hatchling"]
41
+ build-backend = "hatchling.build"
42
+
43
+
44
+ [tool.ruff.lint]
45
+ ignore = ["E741"]
46
+
47
+ [tool.hatch.build]
48
+ include = ["src/eptr2/**", "README.md", "LICENSE", "pyproject.toml"]
49
+
50
+ [tool.hatch.build.targets.wheel]
51
+ packages = ["src/eptr2"]
52
+
53
+ [dependency-groups]
54
+ docs = [
55
+ "mkdocs-autorefs>=1.4.3",
56
+ "mkdocs-material>=9.7.1",
57
+ "mkdocstrings[python]>=1.0.0",
58
+ ]
59
+ dev = ["pytest>=7.4.0", "python-dotenv>=1.1.1"]