gridappsd-python 2025.3.1a5__py3-none-any.whl → 2025.3.2a2__py3-none-any.whl

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.
gridappsd/__main__.py CHANGED
@@ -44,10 +44,12 @@ import argparse
44
44
  from argparse import ArgumentParser
45
45
  from time import sleep
46
46
  import yaml
47
+ from dotenv import load_dotenv
48
+ from pathlib import Path
47
49
 
48
50
  from gridappsd import GridAPPSD
49
51
 
50
- assert sys.version_info >= (3, 6), "Minimum version is python 3.6"
52
+ assert sys.version_info >= (3, 10), "Minimum version is python 3.10"
51
53
 
52
54
  logging.basicConfig(stream=sys.stdout,
53
55
  level=logging.INFO,
@@ -65,7 +67,9 @@ if __name__ == '__main__':
65
67
  "--run-simulation",
66
68
  type=argparse.FileType('r'),
67
69
  help="Start running a simulation from a passed simulation file.")
68
-
70
+ group.add_argument("--env", required=False, type=str,
71
+ default=".env",
72
+ help="Load environment variables from a .env file.")
69
73
  opts = parser.parse_args()
70
74
 
71
75
  if opts.run_simulation:
@@ -75,6 +79,15 @@ if __name__ == '__main__':
75
79
  sleep(1)
76
80
  simulation.resume()
77
81
 
82
+ if opts.env:
83
+ _log.info(f"Loading environment variables from {opts.env}")
84
+ env_path = Path(opts.env).expanduser()
85
+ if env_path.is_file():
86
+ load_dotenv(opts.env)
87
+ else:
88
+ _log.error(f"Environment file {opts.env} not found. Skipping loading.")
89
+ sys.exit(1)
90
+
78
91
  gappsd = GridAPPSD()
79
92
  run_args = yaml.safe_load(opts.run_simulation)
80
93
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gridappsd-python
3
- Version: 2025.3.1a5
3
+ Version: 2025.3.2a2
4
4
  Summary: A GridAPPS-D Python Adapter
5
5
  License: BSD-3-Clause
6
6
  Keywords: gridappsd,grid,activemq,powergrid,simulation,library
@@ -15,6 +15,8 @@ Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Requires-Dist: PyYAML (>=6.0,<7.0)
17
17
  Requires-Dist: dateutils (>=0.6.7,<0.7.0)
18
+ Requires-Dist: dotenv (>=0.9.9,<0.10.0)
19
+ Requires-Dist: loguru (>=0.7.3,<0.8.0)
18
20
  Requires-Dist: pytz (>=2022.7,<2023.0)
19
21
  Requires-Dist: requests (==2.28.2)
20
22
  Requires-Dist: stomp-py (==6.0.0)
@@ -1,5 +1,5 @@
1
1
  gridappsd/__init__.py,sha256=DQrkOgYu4j7UhCI4J4LoqSIE3QfSGlyOEZ9p-_aJMp8,3794
2
- gridappsd/__main__.py,sha256=VoxNjKqal6RKb8cLilY1G4kFletzPhPOa_XISUGBXaw,4685
2
+ gridappsd/__main__.py,sha256=_RHGeetJwNoqQGkU3lLbTsHWAm14YAgsinjqeEEKL_w,5267
3
3
  gridappsd/app_registration.py,sha256=WRE3MXVNbxXn6Cxv86CraIHDFdLEE8zmmE6Zw_49h4E,7012
4
4
  gridappsd/difference_builder.py,sha256=3_2NnaqSsoC0cqRMZsztUhae9Bd_zySGdwMlTnnKdIM,5010
5
5
  gridappsd/docker_handler.py,sha256=VQVqImWu3Kmu_OBJTkMSuU2bZ9xCd1v3RW1doc9iqzM,30366
@@ -14,7 +14,7 @@ gridappsd/simulation.py,sha256=ytfdTb_njFLBFu_zZZk0xldl-YM7e6CgFP2-Fb4AmXk,12234
14
14
  gridappsd/timeseries.py,sha256=85DiltlBEen_TKvfEiFWvYiFemrpDvuu8z8LhboHcls,3201
15
15
  gridappsd/topics.py,sha256=Wie5B-byF3sLqCzoCh1Z2vMjR4wjDgAoV_jXKky6128,12186
16
16
  gridappsd/utils.py,sha256=HeiZEcFlnbbghbEn0febRn45umeoLq5U-gt-pOGd1VU,3167
17
- gridappsd_python-2025.3.1a5.dist-info/METADATA,sha256=vG8h4TEv-SQGoRhLTb3EUJSOcE0bjXUw6aAbEsn5rhg,11436
18
- gridappsd_python-2025.3.1a5.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
19
- gridappsd_python-2025.3.1a5.dist-info/entry_points.txt,sha256=wDoyDmqrxfE_jICSHyDxYbHagzUvt3Oex5_vKBLsiMo,94
20
- gridappsd_python-2025.3.1a5.dist-info/RECORD,,
17
+ gridappsd_python-2025.3.2a2.dist-info/METADATA,sha256=qGBdy0NIGypx3zW1ZbHf1s1DBUBxVJNgNvnnnOTmQ2Y,11515
18
+ gridappsd_python-2025.3.2a2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
19
+ gridappsd_python-2025.3.2a2.dist-info/entry_points.txt,sha256=wDoyDmqrxfE_jICSHyDxYbHagzUvt3Oex5_vKBLsiMo,94
20
+ gridappsd_python-2025.3.2a2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any