dmart 1.4.40.post19__py3-none-any.whl → 1.4.40.post20__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.
- dmart/dmart.py +23 -21
- {dmart-1.4.40.post19.dist-info → dmart-1.4.40.post20.dist-info}/METADATA +1 -1
- {dmart-1.4.40.post19.dist-info → dmart-1.4.40.post20.dist-info}/RECORD +6 -6
- {dmart-1.4.40.post19.dist-info → dmart-1.4.40.post20.dist-info}/WHEEL +0 -0
- {dmart-1.4.40.post19.dist-info → dmart-1.4.40.post20.dist-info}/entry_points.txt +0 -0
- {dmart-1.4.40.post19.dist-info → dmart-1.4.40.post20.dist-info}/top_level.txt +0 -0
dmart/dmart.py
CHANGED
|
@@ -48,7 +48,7 @@ commands = """
|
|
|
48
48
|
sentinel = object()
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
def hypercorn_main() -> int:
|
|
51
|
+
def hypercorn_main(args_list: list[str]) -> int:
|
|
52
52
|
parser = argparse.ArgumentParser()
|
|
53
53
|
parser.add_argument(
|
|
54
54
|
"application",
|
|
@@ -254,7 +254,7 @@ def hypercorn_main() -> int:
|
|
|
254
254
|
default=sentinel,
|
|
255
255
|
type=int,
|
|
256
256
|
)
|
|
257
|
-
args = parser.parse_args(
|
|
257
|
+
args = parser.parse_args(args_list)
|
|
258
258
|
|
|
259
259
|
if args.config == "hypercorn_config.toml" and not os.path.exists(args.config):
|
|
260
260
|
config = Config()
|
|
@@ -409,23 +409,25 @@ def print_formatted(data):
|
|
|
409
409
|
|
|
410
410
|
|
|
411
411
|
def main():
|
|
412
|
-
sys.argv
|
|
413
|
-
if len(sys.argv) == 0:
|
|
412
|
+
if len(sys.argv) < 2:
|
|
414
413
|
print("You must provide a command to run:")
|
|
415
414
|
print(commands)
|
|
416
415
|
sys.exit(1)
|
|
417
416
|
|
|
418
|
-
|
|
417
|
+
command = sys.argv[1]
|
|
418
|
+
args_list = sys.argv[2:]
|
|
419
|
+
|
|
420
|
+
match command:
|
|
419
421
|
case "hyper":
|
|
420
|
-
hypercorn_main()
|
|
422
|
+
hypercorn_main(args_list)
|
|
421
423
|
case "cli":
|
|
422
424
|
config_file = None
|
|
423
|
-
if "--config" in
|
|
424
|
-
idx =
|
|
425
|
-
if idx + 1 < len(
|
|
426
|
-
config_file =
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
if "--config" in args_list:
|
|
426
|
+
idx = args_list.index("--config")
|
|
427
|
+
if idx + 1 < len(args_list):
|
|
428
|
+
config_file = args_list[idx + 1]
|
|
429
|
+
args_list.pop(idx + 1)
|
|
430
|
+
args_list.pop(idx)
|
|
429
431
|
|
|
430
432
|
if not config_file:
|
|
431
433
|
if os.path.exists("cli.ini"):
|
|
@@ -521,16 +523,16 @@ def main():
|
|
|
521
523
|
sys.exit(1)
|
|
522
524
|
case "serve":
|
|
523
525
|
open_cxb = False
|
|
524
|
-
if "--open-cxb" in
|
|
526
|
+
if "--open-cxb" in args_list:
|
|
525
527
|
open_cxb = True
|
|
526
|
-
|
|
528
|
+
args_list.remove("--open-cxb")
|
|
527
529
|
|
|
528
|
-
if "--cxb-config" in
|
|
529
|
-
idx =
|
|
530
|
-
if idx + 1 < len(
|
|
531
|
-
os.environ["DMART_CXB_CONFIG"] =
|
|
532
|
-
|
|
533
|
-
|
|
530
|
+
if "--cxb-config" in args_list:
|
|
531
|
+
idx = args_list.index("--cxb-config")
|
|
532
|
+
if idx + 1 < len(args_list):
|
|
533
|
+
os.environ["DMART_CXB_CONFIG"] = args_list[idx + 1]
|
|
534
|
+
args_list.pop(idx + 1)
|
|
535
|
+
args_list.pop(idx)
|
|
534
536
|
|
|
535
537
|
if open_cxb:
|
|
536
538
|
host = settings.listening_host
|
|
@@ -764,7 +766,7 @@ def main():
|
|
|
764
766
|
config.write(temp_config_file)
|
|
765
767
|
temp_config_path = temp_config_file.name
|
|
766
768
|
|
|
767
|
-
alembic_cli_args =
|
|
769
|
+
alembic_cli_args = args_list
|
|
768
770
|
if not alembic_cli_args:
|
|
769
771
|
alembic_cli_args = ["upgrade", "head"]
|
|
770
772
|
|
|
@@ -8,7 +8,7 @@ dmart/conftest.py,sha256=0ry_zeCmdBNLbm5q115b-pkOrUFYxdsOUXbIMkr7E5Y,362
|
|
|
8
8
|
dmart/curl.pypi.sh,sha256=KQ-kgV3_d5mwqoLd4XOwz5s2wRQ7LDVX3z-kvjvp9hA,15631
|
|
9
9
|
dmart/curl.sh,sha256=lmHSFVr5ft-lc5Aq9LfvKyWfntrfYbnirhzx1EGjp_A,15743
|
|
10
10
|
dmart/data_generator.py,sha256=CnE-VHEeX7-lAXtqCgbRqR9WHjTuOgeiZcviYrHAmho,2287
|
|
11
|
-
dmart/dmart.py,sha256=
|
|
11
|
+
dmart/dmart.py,sha256=kXo4X_2owhksqi8AyIy-VnjTil0Ub59kHUEil_h4P-c,32175
|
|
12
12
|
dmart/get_settings.py,sha256=Sbe2WCoiK398E7HY4SNLfDN_GmE8knR4M-YJWF31jcg,153
|
|
13
13
|
dmart/hypercorn_config.toml,sha256=-eryppEG8HBOM_KbFc4dTQePnpyfoW9ZG5aUATU_6yM,50
|
|
14
14
|
dmart/info.json,sha256=6Kb7MXzVS0PzDZOUXtBoAA3zpxvtRBR0PJnedjBE-v4,123
|
|
@@ -483,8 +483,8 @@ dmart/utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGV
|
|
|
483
483
|
dmart/utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
|
|
484
484
|
dmart/utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
|
|
485
485
|
dmart/utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
|
|
486
|
-
dmart-1.4.40.
|
|
487
|
-
dmart-1.4.40.
|
|
488
|
-
dmart-1.4.40.
|
|
489
|
-
dmart-1.4.40.
|
|
490
|
-
dmart-1.4.40.
|
|
486
|
+
dmart-1.4.40.post20.dist-info/METADATA,sha256=TGrQyNh7QshaAyxcYzXln6xc5wuTDi_v8XtatAy2bak,839
|
|
487
|
+
dmart-1.4.40.post20.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
488
|
+
dmart-1.4.40.post20.dist-info/entry_points.txt,sha256=N832M4wG8d2GDw1xztKRVM3TnxpY2QDzvdFE8XaWaG8,43
|
|
489
|
+
dmart-1.4.40.post20.dist-info/top_level.txt,sha256=zJo4qk9fUW0BGIR9f4DCfpxaXbvQXH9izIOom6JsyAo,6
|
|
490
|
+
dmart-1.4.40.post20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|