panther 4.2.0__py3-none-any.whl → 4.2.1__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.
panther/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from panther.main import Panther # noqa: F401
2
2
 
3
- __version__ = '4.2.0'
3
+ __version__ = '4.2.1'
4
4
 
5
5
 
6
6
  def version():
@@ -1,6 +1,7 @@
1
1
  import contextlib
2
2
  import logging
3
3
  import os
4
+ import platform
4
5
  import signal
5
6
  from collections import deque
6
7
  from pathlib import Path
@@ -43,7 +44,12 @@ class Monitoring:
43
44
  ):
44
45
  f.readlines() # Set cursor at the end of the file
45
46
 
46
- for _ in watch(self.monitoring_log_file):
47
+ if platform.system() == 'Windows':
48
+ watching = watch(self.monitoring_log_file, force_polling=True)
49
+ else:
50
+ watching = watch(self.monitoring_log_file)
51
+
52
+ for _ in watching:
47
53
  for line in f.readlines():
48
54
  self.rows.append(line.split('|'))
49
55
  live.update(self.generate_table())
@@ -63,7 +69,8 @@ class Monitoring:
63
69
  self.update_rows()
64
70
 
65
71
  # Register the signal handler
66
- signal.signal(signal.SIGWINCH, self.update_rows)
72
+ if platform.system() != 'Windows':
73
+ signal.signal(signal.SIGWINCH, self.update_rows)
67
74
 
68
75
  def generate_table(self) -> Panel:
69
76
  # 2023-03-24 01:42:52 | GET | /user/317/ | 127.0.0.1:48856 | 0.0366 ms | 200
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: panther
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Summary: Fast & Friendly, Web Framework For Building Async APIs
5
5
  Home-page: https://github.com/alirn76/panther
6
6
  Author: Ali RajabNezhad
@@ -1,4 +1,4 @@
1
- panther/__init__.py,sha256=sduiFCRbp6Nv6i1LB-sOh5Eb8lOJMR-Plz6Th79QwCs,110
1
+ panther/__init__.py,sha256=FNvVOK_b7dQt56wvvO6McE7Wsf-S0hrE5BYEyXdaMvI,110
2
2
  panther/_load_configs.py,sha256=AVkoixkUFkBQiTmrLrwCmg0eiPW2U_Uw2EGNEGQRfnI,9281
3
3
  panther/_utils.py,sha256=j0rwIxTf0rtcZAAD-1nGE-_bWpvinyKtnwt3uO0hMmY,4330
4
4
  panther/app.py,sha256=e2eb4sXIaBje5vpcm4pbvvEO_sj83pLfBHCIZJFFX38,8222
@@ -29,7 +29,7 @@ panther/websocket.py,sha256=5WLw--Oa-6kGYbeRvO79hjbd0ARFcTTF40-hO_bdjmQ,1206
29
29
  panther/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  panther/cli/create_command.py,sha256=mT5GFzsTYZbzqShNHlw_UIkMcWLw9btm2mTwcg7TlfI,10292
31
31
  panther/cli/main.py,sha256=pCqnOTazgMhTvFHTugutIsiFXueU5kx2VmGngwAl54Q,1679
32
- panther/cli/monitor_command.py,sha256=7N1-4W0Lu7yl5maehJowe04WH4nxZ1DumGDRATh82SQ,3139
32
+ panther/cli/monitor_command.py,sha256=sbnxQOSy0Q6GB-ELrfyoY6S-ZwgbI7eZyKx7YkvrEas,3383
33
33
  panther/cli/run_command.py,sha256=yWcDoWC-c4ph4M5EDj0jvR9xSjh-apG5r6-NpDdArUo,2195
34
34
  panther/cli/template.py,sha256=hVkY1A3HZDVGEZzRkMtYte6FagKGTAxoFeG0wot7Zn4,5320
35
35
  panther/cli/utils.py,sha256=Jd4YQ9H6lapVktl7ZmiORt30WVmKI85xcwsY-fMRq3c,5289
@@ -49,9 +49,9 @@ panther/panel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  panther/panel/apis.py,sha256=COsbwKZyTgyHvHYbpDfusifAH9ojMS3z1KhZCt9M-Ms,2428
50
50
  panther/panel/urls.py,sha256=JiV-H4dWE-m_bfaTTVxzOxTvJmOWhyLOvcbM7xU3Bn4,240
51
51
  panther/panel/utils.py,sha256=0Rv79oR5IEqalqwpRKQHMn1p5duVY5mxMqDKiA5mWx4,437
52
- panther-4.2.0.dist-info/LICENSE,sha256=2aF1hL2aC0zRPjzUkSxJUzZbn2_uLoOkn7DHjzZni-I,1524
53
- panther-4.2.0.dist-info/METADATA,sha256=N0SkpG2_UqpwuGhnGC8zOUdmnMYKNaaJG4sJaYl0UEk,6376
54
- panther-4.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
55
- panther-4.2.0.dist-info/entry_points.txt,sha256=6GPxYFGuzVfNB4YpHFJvYex6iWah5_tLnirAHwj2Qsg,51
56
- panther-4.2.0.dist-info/top_level.txt,sha256=VbBs02JGXTIoHMzsX-eLOk2MCbBZzQbLhWiYpI7xI2g,8
57
- panther-4.2.0.dist-info/RECORD,,
52
+ panther-4.2.1.dist-info/LICENSE,sha256=2aF1hL2aC0zRPjzUkSxJUzZbn2_uLoOkn7DHjzZni-I,1524
53
+ panther-4.2.1.dist-info/METADATA,sha256=wCJaRg5G5kpp0tdMp6z1HXIY9QLMVuDmcqFpmee9ksY,6376
54
+ panther-4.2.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
55
+ panther-4.2.1.dist-info/entry_points.txt,sha256=6GPxYFGuzVfNB4YpHFJvYex6iWah5_tLnirAHwj2Qsg,51
56
+ panther-4.2.1.dist-info/top_level.txt,sha256=VbBs02JGXTIoHMzsX-eLOk2MCbBZzQbLhWiYpI7xI2g,8
57
+ panther-4.2.1.dist-info/RECORD,,