arthexis 0.1.9__py3-none-any.whl → 0.1.26__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.

Potentially problematic release.


This version of arthexis might be problematic. Click here for more details.

Files changed (112) hide show
  1. arthexis-0.1.26.dist-info/METADATA +272 -0
  2. arthexis-0.1.26.dist-info/RECORD +111 -0
  3. {arthexis-0.1.9.dist-info → arthexis-0.1.26.dist-info}/licenses/LICENSE +674 -674
  4. config/__init__.py +5 -5
  5. config/active_app.py +15 -15
  6. config/asgi.py +29 -29
  7. config/auth_app.py +7 -7
  8. config/celery.py +32 -25
  9. config/context_processors.py +67 -68
  10. config/horologia_app.py +7 -7
  11. config/loadenv.py +11 -11
  12. config/logging.py +59 -48
  13. config/middleware.py +71 -25
  14. config/offline.py +49 -49
  15. config/settings.py +676 -492
  16. config/settings_helpers.py +109 -0
  17. config/urls.py +228 -159
  18. config/wsgi.py +17 -17
  19. core/admin.py +4052 -2066
  20. core/admin_history.py +50 -50
  21. core/admindocs.py +192 -151
  22. core/apps.py +350 -223
  23. core/auto_upgrade.py +72 -0
  24. core/backends.py +311 -124
  25. core/changelog.py +403 -0
  26. core/entity.py +149 -133
  27. core/environment.py +60 -43
  28. core/fields.py +168 -75
  29. core/form_fields.py +75 -0
  30. core/github_helper.py +188 -25
  31. core/github_issues.py +183 -172
  32. core/github_repos.py +72 -0
  33. core/lcd_screen.py +78 -78
  34. core/liveupdate.py +25 -25
  35. core/log_paths.py +114 -100
  36. core/mailer.py +89 -83
  37. core/middleware.py +91 -91
  38. core/models.py +5041 -2195
  39. core/notifications.py +105 -105
  40. core/public_wifi.py +267 -227
  41. core/reference_utils.py +107 -0
  42. core/release.py +940 -346
  43. core/rfid_import_export.py +113 -0
  44. core/sigil_builder.py +149 -131
  45. core/sigil_context.py +20 -20
  46. core/sigil_resolver.py +250 -284
  47. core/system.py +1425 -230
  48. core/tasks.py +538 -199
  49. core/temp_passwords.py +181 -0
  50. core/test_system_info.py +202 -43
  51. core/tests.py +2673 -1069
  52. core/tests_liveupdate.py +17 -17
  53. core/urls.py +11 -11
  54. core/user_data.py +681 -495
  55. core/views.py +2484 -789
  56. core/widgets.py +213 -51
  57. nodes/admin.py +2236 -445
  58. nodes/apps.py +98 -70
  59. nodes/backends.py +160 -53
  60. nodes/dns.py +203 -0
  61. nodes/feature_checks.py +133 -0
  62. nodes/lcd.py +165 -165
  63. nodes/models.py +2375 -870
  64. nodes/reports.py +411 -0
  65. nodes/rfid_sync.py +210 -0
  66. nodes/signals.py +18 -0
  67. nodes/tasks.py +141 -46
  68. nodes/tests.py +5045 -1489
  69. nodes/urls.py +29 -13
  70. nodes/utils.py +172 -73
  71. nodes/views.py +1768 -304
  72. ocpp/admin.py +1775 -481
  73. ocpp/apps.py +25 -25
  74. ocpp/consumers.py +1843 -630
  75. ocpp/evcs.py +844 -928
  76. ocpp/evcs_discovery.py +158 -0
  77. ocpp/models.py +1417 -640
  78. ocpp/network.py +398 -0
  79. ocpp/reference_utils.py +42 -0
  80. ocpp/routing.py +11 -9
  81. ocpp/simulator.py +745 -368
  82. ocpp/status_display.py +26 -0
  83. ocpp/store.py +603 -403
  84. ocpp/tasks.py +479 -31
  85. ocpp/test_export_import.py +131 -130
  86. ocpp/test_rfid.py +1072 -540
  87. ocpp/tests.py +5494 -2296
  88. ocpp/transactions_io.py +197 -165
  89. ocpp/urls.py +50 -50
  90. ocpp/views.py +2024 -912
  91. pages/admin.py +1123 -396
  92. pages/apps.py +45 -10
  93. pages/checks.py +40 -40
  94. pages/context_processors.py +151 -85
  95. pages/defaults.py +13 -0
  96. pages/forms.py +221 -0
  97. pages/middleware.py +213 -153
  98. pages/models.py +720 -252
  99. pages/module_defaults.py +156 -0
  100. pages/site_config.py +137 -0
  101. pages/tasks.py +74 -0
  102. pages/tests.py +4009 -1389
  103. pages/urls.py +38 -20
  104. pages/utils.py +93 -12
  105. pages/views.py +1736 -762
  106. arthexis-0.1.9.dist-info/METADATA +0 -168
  107. arthexis-0.1.9.dist-info/RECORD +0 -92
  108. core/workgroup_urls.py +0 -17
  109. core/workgroup_views.py +0 -94
  110. nodes/actions.py +0 -70
  111. {arthexis-0.1.9.dist-info → arthexis-0.1.26.dist-info}/WHEEL +0 -0
  112. {arthexis-0.1.9.dist-info → arthexis-0.1.26.dist-info}/top_level.txt +0 -0
@@ -1,168 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: arthexis
3
- Version: 0.1.9
4
- Summary: Django-based MESH system
5
- Author-email: "Rafael J. Guillén-Osorio" <tecnologia@gelectriic.com>
6
- License-Expression: GPL-3.0-only
7
- Project-URL: Repository, https://github.com/arthexis/arthexis
8
- Project-URL: Homepage, https://arthexis.com
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Framework :: Django
11
- Requires-Python: >=3.10
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: amqp==5.3.1
15
- Requires-Dist: annotated-types==0.7.0
16
- Requires-Dist: anyio==4.9.0
17
- Requires-Dist: asgiref==3.9.1
18
- Requires-Dist: atproto==0.0.61
19
- Requires-Dist: attrs==25.3.0
20
- Requires-Dist: autobahn==24.4.2
21
- Requires-Dist: Automat==25.4.16
22
- Requires-Dist: billiard==4.2.1
23
- Requires-Dist: bleach==6.2.0
24
- Requires-Dist: black==24.10.0
25
- Requires-Dist: celery==5.5.3
26
- Requires-Dist: certifi==2025.7.14
27
- Requires-Dist: cffi==1.17.1
28
- Requires-Dist: channels==4.1.0
29
- Requires-Dist: charset-normalizer==3.4.2
30
- Requires-Dist: click==8.2.1
31
- Requires-Dist: click-didyoumean==0.3.1
32
- Requires-Dist: click-plugins==1.1.1.2
33
- Requires-Dist: click-repl==0.3.0
34
- Requires-Dist: colorama==0.4.6
35
- Requires-Dist: constantly==23.10.4
36
- Requires-Dist: cron-descriptor==1.4.5
37
- Requires-Dist: cryptography==45.0.5
38
- Requires-Dist: daphne==4.2.1
39
- Requires-Dist: diff-match-patch==20241021
40
- Requires-Dist: defusedxml==0.7.1
41
- Requires-Dist: Django==5.2.4
42
- Requires-Dist: django-celery-beat==2.8.1
43
- Requires-Dist: django-debug-toolbar==6.0.0
44
- Requires-Dist: django-import-export==4.3.9
45
- Requires-Dist: django-object-actions==5.0.0
46
- Requires-Dist: django-timezone-field==7.1
47
- Requires-Dist: dnspython==2.7.0
48
- Requires-Dist: docutils==0.22
49
- Requires-Dist: gpiozero==2.0.1; sys_platform == "linux"
50
- Requires-Dist: graphviz==0.20.3
51
- Requires-Dist: h11==0.16.0
52
- Requires-Dist: httpcore==1.0.9
53
- Requires-Dist: httpx==0.28.1
54
- Requires-Dist: hyperlink==21.0.0
55
- Requires-Dist: idna==3.10
56
- Requires-Dist: incremental==24.7.2
57
- Requires-Dist: kombu==5.5.4
58
- Requires-Dist: libipld==3.1.1
59
- Requires-Dist: Markdown==3.8.2
60
- Requires-Dist: mcp==1.14.0
61
- Requires-Dist: mfrc522==0.0.7; sys_platform == "linux"
62
- Requires-Dist: outcome==1.3.0.post0
63
- Requires-Dist: packaging==25.0
64
- Requires-Dist: pillow==11.3.0
65
- Requires-Dist: prompt_toolkit==3.0.51
66
- Requires-Dist: psycopg==3.2.9
67
- Requires-Dist: psycopg-binary==3.2.9
68
- Requires-Dist: pyasn1==0.6.1
69
- Requires-Dist: pyasn1_modules==0.4.2
70
- Requires-Dist: pycparser==2.22
71
- Requires-Dist: pydantic==2.11.7
72
- Requires-Dist: pydantic_core==2.33.2
73
- Requires-Dist: pyOpenSSL==25.1.0
74
- Requires-Dist: pyperclip==1.9.0
75
- Requires-Dist: PySocks==1.7.1
76
- Requires-Dist: python-crontab==3.3.0
77
- Requires-Dist: python-dateutil==2.9.0.post0
78
- Requires-Dist: python-dotenv==1.1.1
79
- Requires-Dist: qrcode==8.2
80
- Requires-Dist: redis==5.0.8
81
- Requires-Dist: requests==2.32.4
82
- Requires-Dist: selenium==4.34.2
83
- Requires-Dist: service-identity==24.2.0
84
- Requires-Dist: setuptools==80.9.0
85
- Requires-Dist: six==1.17.0
86
- Requires-Dist: smbus2==0.5.0
87
- Requires-Dist: sniffio==1.3.1
88
- Requires-Dist: sortedcontainers==2.4.0
89
- Requires-Dist: sqlparse==0.5.3
90
- Requires-Dist: tablib==3.8.0
91
- Requires-Dist: tinycss2==1.4.0
92
- Requires-Dist: toml==0.10.2
93
- Requires-Dist: trio==0.30.0
94
- Requires-Dist: trio-websocket==0.12.2
95
- Requires-Dist: Twisted==25.5.0
96
- Requires-Dist: twine==6.1.0
97
- Requires-Dist: txaio==25.6.1
98
- Requires-Dist: typing-inspection==0.4.1
99
- Requires-Dist: typing_extensions==4.14.1
100
- Requires-Dist: tzdata==2025.2
101
- Requires-Dist: urllib3==2.5.0
102
- Requires-Dist: vine==5.1.0
103
- Requires-Dist: wcwidth==0.2.13
104
- Requires-Dist: webencodings==0.5.1
105
- Requires-Dist: websocket-client==1.8.0
106
- Requires-Dist: websockets==13.1
107
- Requires-Dist: whitenoise==6.9.0
108
- Requires-Dist: plyer==2.1.0; sys_platform == "win32"
109
- Requires-Dist: wsproto==1.2.0
110
- Requires-Dist: zope.interface==7.2
111
- Dynamic: license-file
112
-
113
- # Arthexis Constellation
114
-
115
- ## Purpose
116
-
117
- Arthexis Constellation is a [narrative-driven](https://en.wikipedia.org/wiki/Narrative) [Django](https://www.djangoproject.com/)-based [software suite](https://en.wikipedia.org/wiki/Software_suite) that centralizes tools for managing [electric vehicle charging infrastructure](https://en.wikipedia.org/wiki/Charging_station) and orchestrating [energy](https://en.wikipedia.org/wiki/Energy)-related [products](https://en.wikipedia.org/wiki/Product_(business)) and [services](https://en.wikipedia.org/wiki/Service_(economics)).
118
-
119
- ## Features
120
-
121
- - Compatible with the [Open Charge Point Protocol (OCPP) 1.6](https://www.openchargealliance.org/protocols/ocpp-16/)
122
- - [API](https://en.wikipedia.org/wiki/API) integration with [Odoo](https://www.odoo.com/) 1.6
123
- - Runs on [Windows 11](https://www.microsoft.com/windows/windows-11) and [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/)
124
- - Tested for the [Raspberry Pi 4 Model B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/)
125
-
126
- Project under active development.
127
-
128
- ## Four Role Architecture
129
-
130
- Arthexis Constellation ships in four node roles tailored to different deployment scenarios.
131
-
132
- | Role | Description & Common Features |
133
- | --- | --- |
134
- | Terminal | Single-User Research & Development<br>Features: GUI Toast |
135
- | Control | Single-Device Testing & Special Task Appliances<br>Features: AP Public Wi-Fi, Celery Queue, GUI Toast, LCD Screen, NGINX Server, RFID Scanner |
136
- | Satellite | Multi-Device Edge, Network & Data Acquisition<br>Features: AP Router, Celery Queue, NGINX Server, RFID Scanner |
137
- | Constellation | Multi-User Cloud & Orchestration<br>Features: Celery Queue, NGINX Server |
138
-
139
- ## Quick Guide
140
-
141
- ### 1. Clone
142
- - **[Linux](https://en.wikipedia.org/wiki/Linux)**: open a [terminal](https://en.wikipedia.org/wiki/Command-line_interface) and run
143
- `git clone https://github.com/arthexis/arthexis.git`
144
- - **[Windows](https://en.wikipedia.org/wiki/Microsoft_Windows)**: open [PowerShell](https://learn.microsoft.com/powershell/) or [Git Bash](https://gitforwindows.org/) and run the same command.
145
-
146
- ### 2. Start and stop
147
- - **[VS Code](https://code.visualstudio.com/)**: open the folder, go to the
148
- **Run and Debug** panel (`Ctrl+Shift+D`), select the **Run Server** (or
149
- **Debug Server**) configuration, and press the green start button. Stop the
150
- server with the red square button (`Shift+F5`).
151
- - **[Shell](https://en.wikipedia.org/wiki/Shell_(computing))**: on Linux run [`./start.sh`](start.sh) and stop with [`./stop.sh`](stop.sh); on Windows run [`start.bat`](start.bat) and stop with `Ctrl+C`.
152
-
153
- ### 3. Install and upgrade
154
- - **Linux**: use [`./install.sh`](install.sh) with options like `--service NAME`, `--public` or `--internal`, `--port PORT`, `--upgrade`, `--auto-upgrade`, `--latest`, `--celery`, `--lcd-screen`, `--no-lcd-screen`, `--clean`, `--datasette`. Upgrade with [`./upgrade.sh`](upgrade.sh) using flags such as `--latest`, `--clean`, or `--no-restart`.
155
- - **Windows**: run [`install.bat`](install.bat) to install and [`upgrade.bat`](upgrade.bat) to upgrade.
156
-
157
- ### 4. Administration
158
- Visit [`http://localhost:8888/admin/`](http://localhost:8888/admin/) for the [Django admin](https://docs.djangoproject.com/en/stable/ref/contrib/admin/) and [`http://localhost:8888/admindocs/`](http://localhost:8888/admindocs/) for the [admindocs](https://docs.djangoproject.com/en/stable/ref/contrib/admin/admindocs/). Use port `8000` if you started with [`start.bat`](start.bat) or the `--public` option.
159
-
160
- ## Support
161
-
162
- Contact us at [tecnologia@gelectriic.com](mailto:tecnologia@gelectriic.com) or visit our [web page](https://www.gelectriic.com/) for [professional services](https://en.wikipedia.org/wiki/Professional_services) and [commercial support](https://en.wikipedia.org/wiki/Technical_support).
163
-
164
- ## About Me
165
-
166
- > "What, you want to know about me too? Well, I enjoy [developing software](https://en.wikipedia.org/wiki/Software_development), [role-playing games](https://en.wikipedia.org/wiki/Role-playing_game), long walks on the [beach](https://en.wikipedia.org/wiki/Beach) and a fourth secret thing."
167
- > --Arthexis
168
-
@@ -1,92 +0,0 @@
1
- arthexis-0.1.9.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
2
- config/__init__.py,sha256=8_b7rx_-Xcuzu3Z7mSR94q3PAhjyYqLFQi3IOEz6hcI,108
3
- config/active_app.py,sha256=MET_G7oHL7GkoSo3VkkMzymM-PwsSZazMLZxpgjFLTo,388
4
- config/asgi.py,sha256=n09URedOmQ_59II3UCl3iodGSDWOuN_A8DFyfLjuylA,803
5
- config/auth_app.py,sha256=2NkC_iYQxnpbv0gYxW4xp5DgQtdkVLpa-JzAF-638ZE,205
6
- config/celery.py,sha256=qRTHgNYfT2OyIz4cW49YiiKgVgzLs2mSfAEQBgso0M4,743
7
- config/context_processors.py,sha256=Iyr_eGoBZuyfxikU7RxQS3DdMI-wudCpPiHttD9Sd_o,2341
8
- config/horologia_app.py,sha256=u1hTYcEmIqh82Gt5YNPvR5ta2MnVatELvD9ByFrCH1A,194
9
- config/loadenv.py,sha256=bhFbHTbRJSkSwrFk3UInKEKQ8ZY-poatOGi7rC57YAI,298
10
- config/logging.py,sha256=334jADN4dM5GNHaCWlYPOKYa5BhfxbsuejH_QDALG6g,1793
11
- config/middleware.py,sha256=EvraDumepnKwCDswHGXb1mK7vud_dEEoZ4eh0IQ7fhQ,744
12
- config/offline.py,sha256=mhQjCUzdOwSzZ6oLgPDJR48xaPIDzOi34ARUEz43seE,1431
13
- config/settings.py,sha256=wRfx3EH5YHuiSB73Xnq-RqLtkLzISBEPwpcXRhqh-ws,14696
14
- config/urls.py,sha256=Eap8bmBfKAA43H05QpAJQfLrGamJYHwmOx4j663EJpU,4950
15
- config/wsgi.py,sha256=Fu-ONO2SgYeU6rhmy909P-uLX-n8ALJQObdm9MHPS-k,450
16
- core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- core/admin.py,sha256=5Dv16tphT5JoCjn1oLiLMfKKJOIeNjz1AZmmgMc6eBs,71319
18
- core/admin_history.py,sha256=NIDWkosJoHMaucBvUjq8VmmL-0e8ngJ4l4XA89d4jwQ,1833
19
- core/admindocs.py,sha256=GufdugiNEG87xGSDYVq4CBMhGRubsQCzgz-FqDIqzpM,5367
20
- core/apps.py,sha256=YFto4vdVW4uq98s-HypSAZx-q3HXDbKuyU7rYaqVDYs,9059
21
- core/backends.py,sha256=fOf64Ajg1arDUzz9yDCvFw5T4ZoRljurIUlcT9GYBHM,4540
22
- core/entity.py,sha256=dkPywTVk981fV8bOEoZw-1SMrdh8T0jVAUZnRxg3dDg,4505
23
- core/environment.py,sha256=QcOshpWNG0l_agW-b9efNvVFKqdatj6sUK8FT6p92gU,1238
24
- core/fields.py,sha256=fe9XupyF7K-5L6Dpxt6by_sQXoxSxf3F_eZpFSf_uFk,2459
25
- core/github_helper.py,sha256=k9LmxL0Ec5MzFwZsbMpWMMJ-5tGMe-5yRoI8V0sbFsw,682
26
- core/github_issues.py,sha256=LKqt-Ilx5TRYnx2LXttc54Nvuh3_1VRP0u_M3whe09c,4963
27
- core/lcd_screen.py,sha256=mkKtIJjHGDLaV4t80L-JScsZXbLhlYUDknAcvV9Ijr0,2651
28
- core/liveupdate.py,sha256=kTgbE2gnU3PPIV-88Bw2swSl1aGp6stSdBYqBFbLvx0,716
29
- core/log_paths.py,sha256=6UXYk6QIUmRO3ecFaFH3dgJ_pf4C_wUN6b0JqUhLVBY,3045
30
- core/mailer.py,sha256=ziw6r4AhMcMRMtNOrcqRXimjo17SooaJJ-fkSVfo_aI,2787
31
- core/middleware.py,sha256=a4XL0pld4YiG-vanHrzYbJNHv64s75lvmG9inoG1ln0,3479
32
- core/models.py,sha256=rkyUZkonxByZi-QnKxPskSD23voC-x-Ud62vFbBSW9U,75354
33
- core/notifications.py,sha256=YtNDGxNveZ6t3tlMXJ7wIaZZTWIZfOKy6vN9mXkeYnA,4021
34
- core/public_wifi.py,sha256=A08IPJqcdgUKSWbktyqsV4ol8C0uxDxZy1s1ECuPdBE,6526
35
- core/release.py,sha256=thtgbfAnxHlOODM8xUVETgY5aAIbddWan0wW9lKmtQI,11064
36
- core/sigil_builder.py,sha256=XxzL0d-GDtHR93_gKNChEWWHb40t8V-CJRQGCzaHEHg,4458
37
- core/sigil_context.py,sha256=8xrGiB2L1dFfSTrVLsFPLKfkhRwCXXZ0-EXvZdPeTMU,459
38
- core/sigil_resolver.py,sha256=kRzkv669R1JggQ7eAXsIfw8kH9wuB8L71pmZYg4vwqs,10108
39
- core/system.py,sha256=wzhWpV1uC1YGHZI_2eJvr3yyj5FgQEIoD1cWCAfDkHo,7866
40
- core/tasks.py,sha256=WBA2WLHNIDhioV7ibTJZLTx_Ix3738qYlP6BpHooJug,5772
41
- core/test_system_info.py,sha256=2uIKVf38Z-isGZJAVmqu8uAYQ8vTBMuLoWpeMQ7Xi0s,1294
42
- core/tests.py,sha256=Uzzg6nWMJiMtN4Yi3fDAbza82rHMT8oXPaAapKPZMpg,42559
43
- core/tests_liveupdate.py,sha256=D1o2gPopnK7wDCeDQlJ-tfitWh4umZQFRxSTCFY-puc,527
44
- core/urls.py,sha256=x-LNCxCgrLINdBsJTUUcAuMS5EK5Sh1ybvsVuUnJfLw,436
45
- core/user_data.py,sha256=p5Y7m9gqV8SHaiPtkIfEsdk7oopqh-pA2ohRPJXnzH8,17186
46
- core/views.py,sha256=RAk9ZEP6Zl2isijsC1AL_jwhMDHjTH-jTJjHNsw-7fY,27929
47
- core/widgets.py,sha256=ihah_-NtFJ3oRCS3TdcT6iHCUTlg1tUULJsVCu05C0o,1379
48
- core/workgroup_urls.py,sha256=2bC8mOMkxIj04WsNis0Td6AmmJFr6z27Ol5epIvhO28,424
49
- core/workgroup_views.py,sha256=pFJ4PIRN3WWpRyombpWDKKteYQYoI7lu7ddSEKojD7I,2983
50
- nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
- nodes/actions.py,sha256=HHnwByTBc3guOORvrKOuvUFID-_BpBq6OENE_PDgk9s,2335
52
- nodes/admin.py,sha256=6wmUDTpCFyZdUt8Ef7c8c347JJ-BOPRPlADFMsUxd9Y,16560
53
- nodes/apps.py,sha256=KijGydsQBS-8Q8uBc0ahDZXSSCMzP3tQcYIEigJxdCE,2077
54
- nodes/backends.py,sha256=cHMpliDO453O8gVmtBRTg2VT0tZ1XL_cgneMyuo3In8,2080
55
- nodes/lcd.py,sha256=7MqS3jV_De2ysSmTtXQfYTWaxdfbmm6YfNdb_7qIVZc,5923
56
- nodes/models.py,sha256=Hq-4dK0IxSZ0JSAGjX4wlTBT0AZFDE6Y6801Rl1pFv4,30229
57
- nodes/tasks.py,sha256=jorbN4h0PqWMBRMFdkGgJtvG8GPFwGr5Hxlm5In3EeY,1568
58
- nodes/tests.py,sha256=CqZwGQRrqqVFcIunfnLaP0S3eV0alBBPhZl8LKsh308,59797
59
- nodes/urls.py,sha256=20yZDZf4DNgIZ9hQWsUzjp8k5Fryg9ukk761_KGQt9k,548
60
- nodes/utils.py,sha256=B9BD3bKBkwDjIqyp0pyjnKQQlRbGRVQndfoaMEJoNDc,2815
61
- nodes/views.py,sha256=uUHDTgARj4eOUOrEUCx41GZzWajT5vHSa9svcAuLYVo,10261
62
- ocpp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- ocpp/admin.py,sha256=sHJaSfFFx6T1J4WBKp_-_Y0zJXZDCJJxFpXrOgH6jTg,14825
64
- ocpp/apps.py,sha256=mCZ5Z0ei7z7c62luIcIhbEuwL1N4czQFSToOkGvRmms,867
65
- ocpp/consumers.py,sha256=C7ZfTuGxf3EDt2cizlSxsdn1KnbpbqUb-rfIUD-mKr4,28171
66
- ocpp/evcs.py,sha256=TppUZ9ACaiXsfhF_DsL0I9jEyZFPbdUpFWP9Ljbe6gI,33973
67
- ocpp/models.py,sha256=RXfdlZ268otOZsWQVEcc0n0YmsrDqserHFNSSuCFIzs,22253
68
- ocpp/routing.py,sha256=g9vPnLw-D1N8L_mW0_oCe-nTDibjC0Et-SFxe8NFAOI,308
69
- ocpp/simulator.py,sha256=iS9Y-ZRdQXd6TuRoviDOVtOgyDtc4in4FkKFwmTrZD8,13764
70
- ocpp/store.py,sha256=h4Mq82dR_8LIXelD99ND12HSHWHEvWhPNNXMyDAwm1M,13247
71
- ocpp/tasks.py,sha256=cOcJBshckFKs8GnACvmYZUBG116amtLRAzEP-JNqlZ0,905
72
- ocpp/test_export_import.py,sha256=TK1__E4K5WrLYPIx-1iJWoIhuRCnOtXc2cYEpGigd3U,4660
73
- ocpp/test_rfid.py,sha256=1Xw54WNLzIv4IvvKbQEAs3jtdcg5sTqQBLJK9ZzCqwE,19301
74
- ocpp/tests.py,sha256=4JCXBL5ieIl4rAiIUFB_aCN6vLNa4OkFF8DdylFysR0,90789
75
- ocpp/transactions_io.py,sha256=OvRynP3DeC9ZpHD3Ez-0YPNPJXFcdSOSKg0nRrwzBJ0,6507
76
- ocpp/urls.py,sha256=jl6AQLtmLMvrNXP3dQKgPe9Kvaul4oaYd80DskpzVBc,1750
77
- ocpp/views.py,sha256=lTxK23r62ridqoSNkj_us7IokQ9T0RYZMBtr24F2ef8,35879
78
- pages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
- pages/admin.py,sha256=IdaAibuYJbRMuxw9vniTcuToGCaRFJewwXQ2XQ-1384,12476
80
- pages/apps.py,sha256=mfCxegmnRqKcszyEwpQhZpW9JWOuEYdVereU_w49BXg,298
81
- pages/checks.py,sha256=an-MlMCIG-FSKmdgOhYV0VOoB_wDQD7dxKD03Hjrzts,1567
82
- pages/context_processors.py,sha256=Ph4PEaq8NbiG50idlBXHzMgMGgyX5aVg1rBmb9bOvcs,2897
83
- pages/middleware.py,sha256=fUdAscLa6h2EqJTFUjhVijfSf82gBfm6XUZTVygWAnk,5227
84
- pages/models.py,sha256=VBGpZVQrOHR6ShvqY5MT_Um8rVUktbKMPnq9KJCsTRo,8375
85
- pages/tests.py,sha256=gOxh0invZL2vcyXY9QhfPxO6OmUwoOWVNFQwvynoZf8,56715
86
- pages/urls.py,sha256=7V2nI74v1SdsQ6_vN-8VbOJA_htP3uoogq1ISYmAlpY,687
87
- pages/utils.py,sha256=7kik1W0Gk6SFxYGhg6shfI2W9Xdcv1sCpkRCQ883a88,311
88
- pages/views.py,sha256=VXciSuB4798pCHG7ZaOExQSC3zL1OSP0KeuyUja_xUk,28854
89
- arthexis-0.1.9.dist-info/METADATA,sha256=WMykpJVayOXcPMDi4bi__VU1mj-kJNGAfKlL7sOW2I0,8029
90
- arthexis-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
91
- arthexis-0.1.9.dist-info/top_level.txt,sha256=J2a2q8_BWrCZ8H2WFUNMBfO2jz8j2gax6zZh-_1QDac,29
92
- arthexis-0.1.9.dist-info/RECORD,,
core/workgroup_urls.py DELETED
@@ -1,17 +0,0 @@
1
- """URL routes for assistant profile endpoints."""
2
-
3
- from django.urls import path
4
-
5
- from . import workgroup_views as views
6
-
7
- app_name = "workgroup"
8
-
9
- urlpatterns = [
10
- path(
11
- "assistant-profiles/<int:user_id>/",
12
- views.issue_key,
13
- name="assistantprofile-issue",
14
- ),
15
- path("assistant/test/", views.assistant_test, name="assistant-test"),
16
- path("chat/", views.chat, name="chat"),
17
- ]
core/workgroup_views.py DELETED
@@ -1,94 +0,0 @@
1
- """REST endpoints for AssistantProfile issuance and authentication."""
2
-
3
- from __future__ import annotations
4
-
5
- from functools import wraps
6
-
7
- from django.apps import apps
8
- from django.contrib.auth import get_user_model
9
- from django.forms.models import model_to_dict
10
- from django.http import HttpResponse, JsonResponse
11
- from django.views.decorators.csrf import csrf_exempt
12
- from django.views.decorators.http import require_GET, require_POST
13
-
14
- from .models import AssistantProfile, hash_key
15
-
16
-
17
- @csrf_exempt
18
- @require_POST
19
- def issue_key(request, user_id: int) -> JsonResponse:
20
- """Issue a new ``user_key`` for ``user_id``.
21
-
22
- The response reveals the plain key once. Store only the hash server-side.
23
- """
24
-
25
- user = get_user_model().objects.get(pk=user_id)
26
- profile, key = AssistantProfile.issue_key(user)
27
- return JsonResponse({"user_id": user_id, "user_key": key})
28
-
29
-
30
- def authenticate(view_func):
31
- """View decorator that validates the ``Authorization`` header."""
32
-
33
- @wraps(view_func)
34
- def wrapper(request, *args, **kwargs):
35
- header = request.META.get("HTTP_AUTHORIZATION", "")
36
- if not header.startswith("Bearer "):
37
- return HttpResponse(status=401)
38
-
39
- key_hash = hash_key(header.split(" ", 1)[1])
40
- try:
41
- profile = AssistantProfile.objects.get(
42
- user_key_hash=key_hash, is_active=True
43
- )
44
- except AssistantProfile.DoesNotExist:
45
- return HttpResponse(status=401)
46
-
47
- profile.touch()
48
- request.assistant_profile = profile
49
- request.chat_profile = profile
50
- return view_func(request, *args, **kwargs)
51
-
52
- return wrapper
53
-
54
-
55
- @require_GET
56
- @authenticate
57
- def assistant_test(request):
58
- """Return a simple greeting to confirm authentication."""
59
-
60
- profile = getattr(request, "assistant_profile", None)
61
- user_id = profile.user_id if profile else None
62
- return JsonResponse({"message": f"Hello from user {user_id}"})
63
-
64
-
65
- @require_GET
66
- @authenticate
67
- def chat(request):
68
- """Return serialized data from any model.
69
-
70
- Clients must provide ``model`` as ``app_label.ModelName`` and may include a
71
- ``pk`` to fetch a specific record. When ``pk`` is omitted, the view returns
72
- up to 100 records.
73
- """
74
-
75
- model_label = request.GET.get("model")
76
- if not model_label:
77
- return JsonResponse({"error": "model parameter required"}, status=400)
78
- try:
79
- model = apps.get_model(model_label)
80
- except LookupError:
81
- return JsonResponse({"error": "unknown model"}, status=400)
82
-
83
- qs = model.objects.all()
84
- pk = request.GET.get("pk")
85
- if pk is not None:
86
- try:
87
- obj = qs.get(pk=pk)
88
- except model.DoesNotExist:
89
- return JsonResponse({"error": "object not found"}, status=404)
90
- data = model_to_dict(obj)
91
- else:
92
- data = [model_to_dict(o) for o in qs[:100]]
93
-
94
- return JsonResponse({"data": data})
nodes/actions.py DELETED
@@ -1,70 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from typing import Dict, Iterable, Optional, Type
4
-
5
- from .models import Node
6
-
7
-
8
- class NodeAction:
9
- """Base class for actions that operate on a :class:`~nodes.models.Node`."""
10
-
11
- #: Human friendly name for this action
12
- display_name: str = ""
13
- #: Short slug used in URLs
14
- slug: str = ""
15
- #: Description of the action
16
- description: str = ""
17
- #: Whether this action supports running on remote nodes
18
- supports_remote: bool = False
19
-
20
- # registry of available actions
21
- registry: Dict[str, Type["NodeAction"]] = {}
22
-
23
- def __init_subclass__(cls, **kwargs):
24
- super().__init_subclass__(**kwargs)
25
- if cls.slug:
26
- key = cls.slug
27
- else:
28
- key = cls.__name__.lower()
29
- cls.slug = key
30
- NodeAction.registry[key] = cls
31
-
32
- @classmethod
33
- def get_actions(cls) -> Iterable[Type["NodeAction"]]:
34
- """Return all registered node actions."""
35
- return cls.registry.values()
36
-
37
- @classmethod
38
- def run(cls, node: Optional[Node] = None, **kwargs):
39
- """Execute this action on ``node``.
40
-
41
- If ``node`` is ``None`` the local node is used. If the target node is
42
- not the local host and ``supports_remote`` is ``False``, a
43
- ``NotImplementedError`` is raised.
44
- """
45
-
46
- if node is None:
47
- node = Node.get_local()
48
- if node is None:
49
- raise ValueError("No local node configured")
50
- if not node.is_local and not cls.supports_remote:
51
- raise NotImplementedError("Remote node actions are not yet implemented")
52
- instance = cls()
53
- return instance.execute(node, **kwargs)
54
-
55
- def execute(self, node: Node, **kwargs): # pragma: no cover - interface
56
- """Perform the action on ``node``."""
57
- raise NotImplementedError
58
-
59
-
60
- class CaptureScreenshotAction(NodeAction):
61
- display_name = "Take Site Screenshot"
62
- slug = "capture-screenshot"
63
-
64
- def execute(self, node: Node, **kwargs): # pragma: no cover - uses selenium
65
- from .utils import capture_screenshot, save_screenshot
66
-
67
- url = f"http://{node.address}:{node.port}"
68
- path = capture_screenshot(url)
69
- save_screenshot(path, node=node, method="NODE_ACTION")
70
- return path