valar 1.2.4__py3-none-any.whl → 1.2.5__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 valar might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: valar
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: valar for morghulis
5
5
  Home-page: https://gitee.com/GRIFFIN120/valar_dev
6
6
  Author: LYP
@@ -30,11 +30,20 @@ valar for morghulis
30
30
 
31
31
  # 1. installation
32
32
 
33
+ - you need to install valar in a django project
34
+
33
35
  ```shell
34
36
  pip install valar
35
37
  ```
36
38
 
37
- # 1. settings
39
+ # 2. root app
40
+
41
+ - you only need 3 files in your root app
42
+ - settings.py
43
+ - asgi.py
44
+ - urls.py
45
+
46
+ ## 2.1 settings.py
38
47
 
39
48
  ```python
40
49
  from pathlib import Path
@@ -99,7 +108,7 @@ MINIO_ROOT = "https://host:9001"
99
108
 
100
109
  ```
101
110
 
102
- # 2. asgi
111
+ ## 2.2 asgi.py
103
112
 
104
113
  ```python
105
114
  from django.core.asgi import get_asgi_application
@@ -118,18 +127,19 @@ application = ProtocolTypeRouter({
118
127
 
119
128
  ```
120
129
 
121
- # 3. migrate
130
+ ## 2.3 urls.py
122
131
 
123
- - no need to makemigrations and migrate for valar, valar will auto migration
132
+ - no need to provide urls for Valar, Valar will auto set urlpatterns for Morghulis (
133
+ see https://www.npmjs.com/package/morghulis)
134
+ - go to section 4 to see how to register channel handlers (a Vue - Django async communication tool) in urls.
124
135
 
125
- # 4. root urls
136
+ # 3. migrate
126
137
 
127
- no need to provide urls for val, valar will auto set urlpatterns for Morghulis (
128
- see https://www.npmjs.com/package/morghulis)
138
+ - no need to makemigrations and migrate for valar, valar will auto migration
129
139
 
130
- # 5. how to register a channel handler for Morghulis async methods
140
+ # 4. how to register a channel handler for Morghulis async methods
131
141
 
132
- ## 5.1 create a handler
142
+ ## 4.1 create a handler
133
143
 
134
144
  ```python
135
145
  import time
@@ -148,7 +158,7 @@ def valar_test_handler(sender: ValarChannelSender):
148
158
  sender.load(tick)
149
159
  ```
150
160
 
151
- ### 5.2 create a dict (e.g. using the name 'channel_mapping') to save your handler
161
+ ### 4.2 create a dict (e.g. using the name 'channel_mapping') to save your handler
152
162
 
153
163
  - I'd like to put it in the root urls.py, you can put it anywhere
154
164
 
@@ -158,13 +168,13 @@ channel_mapping = {
158
168
  }
159
169
  ```
160
170
 
161
- ## 5.2 register the channel_mapping in the settings.py
171
+ ## 4.3 register the channel_mapping in the settings.py
162
172
 
163
173
  ```python
164
174
  HANDLER_MAPPING = "%s.urls.channel_mapping" % BASE_APP
165
175
  ```
166
176
 
167
- ### 5.4 you can copy the following codes to your urls.py
177
+ ### 4.4 you can copy the following codes to your urls.py
168
178
 
169
179
  ```python
170
180
  import json
@@ -40,8 +40,8 @@ valar/views/file.py,sha256=NxfbxT4EJRDFgXol06kD0vcSp4lN4BCVJ5wq43rh8Yg,1537
40
40
  valar/views/handler.py,sha256=C7-aRfoA6YvBVul9ioswMRSRvYmxslFF4ETTZBvjX6o,1417
41
41
  valar/views/meta.py,sha256=H3_raG-LEcfg1p_CBpluhPXBsLFQB_jtaI5CKGgYOKk,4774
42
42
  valar/views/rest.py,sha256=HnmPR6_Q_NTtotaeDjfwIGwVG7eigtKBXfoaedUgar8,2349
43
- valar-1.2.4.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
44
- valar-1.2.4.dist-info/METADATA,sha256=KFON-nEZqFokuY97m6hL9OFr2SVaGZmVGFN6WwsMh4E,4227
45
- valar-1.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
- valar-1.2.4.dist-info/top_level.txt,sha256=TVi6VcvvYfVYZ_WnUVwT4psI8p6inaP3KfmQEWrrvYg,6
47
- valar-1.2.4.dist-info/RECORD,,
43
+ valar-1.2.5.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
44
+ valar-1.2.5.dist-info/METADATA,sha256=6G-JTt8Ykfr3Up06gnvbPdB7e_C4IiMf_kZMoxm4dbY,4504
45
+ valar-1.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
+ valar-1.2.5.dist-info/top_level.txt,sha256=TVi6VcvvYfVYZ_WnUVwT4psI8p6inaP3KfmQEWrrvYg,6
47
+ valar-1.2.5.dist-info/RECORD,,
File without changes