dearpygui-forms 0.1.2__py3-none-any.whl → 0.1.3__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.
- dearpygui_forms/__init__.py +3 -3
- dearpygui_forms-0.1.3.dist-info/METADATA +34 -0
- dearpygui_forms-0.1.3.dist-info/RECORD +5 -0
- dearpygui_forms-0.1.2.dist-info/METADATA +0 -9
- dearpygui_forms-0.1.2.dist-info/RECORD +0 -5
- {dearpygui_forms-0.1.2.dist-info → dearpygui_forms-0.1.3.dist-info}/WHEEL +0 -0
- {dearpygui_forms-0.1.2.dist-info → dearpygui_forms-0.1.3.dist-info}/entry_points.txt +0 -0
dearpygui_forms/__init__.py
CHANGED
@@ -83,13 +83,13 @@ class DPGForm:
|
|
83
83
|
dpg.add_input_text(label=property_schema["title"], default_value=default_value or '')
|
84
84
|
elif property_type == "integer":
|
85
85
|
schema["properties"][property_name]["dpg_form_id"] = \
|
86
|
-
dpg.add_input_int(label=property_schema["title"], default_value=default_value)
|
86
|
+
dpg.add_input_int(label=property_schema["title"], default_value=default_value or 0)
|
87
87
|
elif property_type == "number":
|
88
88
|
schema["properties"][property_name]["dpg_form_id"] = \
|
89
|
-
dpg.add_input_float(label=property_schema["title"], default_value=float(default_value))
|
89
|
+
dpg.add_input_float(label=property_schema["title"], default_value=float(default_value or 0))
|
90
90
|
elif property_type == "boolean":
|
91
91
|
schema["properties"][property_name]["dpg_form_id"] = \
|
92
|
-
dpg.add_checkbox(label=property_schema["title"], default_value=default_value)
|
92
|
+
dpg.add_checkbox(label=property_schema["title"], default_value=default_value or False)
|
93
93
|
elif property_type == "array":
|
94
94
|
schema["properties"][property_name]["dpg_form_id"] = \
|
95
95
|
dpg.add_input_text(label=property_schema["title"])
|
@@ -0,0 +1,34 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: dearpygui-forms
|
3
|
+
Version: 0.1.3
|
4
|
+
Summary: Dearpygui extention for autogeneration forms powered by pydantic.
|
5
|
+
Author-email: Valentin Lewicki <vlewicki@vlewicki.ru>
|
6
|
+
Requires-Python: >=3.13
|
7
|
+
Requires-Dist: dearpygui>=2.0.0
|
8
|
+
Requires-Dist: loguru>=0.7.3
|
9
|
+
Requires-Dist: pydantic>=2.11.7
|
10
|
+
Description-Content-Type: text/markdown
|
11
|
+
|
12
|
+
# Example:
|
13
|
+
```python
|
14
|
+
import dearpygui.dearpygui as dpg
|
15
|
+
from pydantic import BaseModel
|
16
|
+
from dearpygui_forms import DPGForm
|
17
|
+
|
18
|
+
class User(BaseModel):
|
19
|
+
name: str
|
20
|
+
age: int
|
21
|
+
|
22
|
+
class UserForm(DPGForm):
|
23
|
+
__pydantic_model__ = User
|
24
|
+
|
25
|
+
dpg.create_context()
|
26
|
+
dpg.create_viewport()
|
27
|
+
with dpg.window(label="User Form"):
|
28
|
+
user_form = UserForm(callback=lambda x: print(x))
|
29
|
+
user_form.add()
|
30
|
+
dpg.setup_dearpygui()
|
31
|
+
dpg.show_viewport()
|
32
|
+
dpg.start_dearpygui()
|
33
|
+
dpg.destroy_context()
|
34
|
+
```
|
@@ -0,0 +1,5 @@
|
|
1
|
+
dearpygui_forms/__init__.py,sha256=-V6Mirf6zPtqJuPTSVl53fnvIVR-wES0MNG7Ljq_mvo,4706
|
2
|
+
dearpygui_forms-0.1.3.dist-info/METADATA,sha256=knJqvRYCLJgqa0mjv75VDvze2qWyqiOGEwO1eIsw_rk,819
|
3
|
+
dearpygui_forms-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
4
|
+
dearpygui_forms-0.1.3.dist-info/entry_points.txt,sha256=7Iv9K4ckShx5C5O1M7Ta6zoIN9HUBBa7vHllqm2kvDQ,57
|
5
|
+
dearpygui_forms-0.1.3.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: dearpygui-forms
|
3
|
-
Version: 0.1.2
|
4
|
-
Summary: Dearpygui extention for autogeneration forms powered by pydantic.
|
5
|
-
Author-email: Valentin Lewicki <vlewicki@vlewicki.ru>
|
6
|
-
Requires-Python: >=3.13
|
7
|
-
Requires-Dist: dearpygui>=2.0.0
|
8
|
-
Requires-Dist: loguru>=0.7.3
|
9
|
-
Requires-Dist: pydantic>=2.11.7
|
@@ -1,5 +0,0 @@
|
|
1
|
-
dearpygui_forms/__init__.py,sha256=nZAlaoWBB-tBVnJxsJzMYtSqRqk6f92Gjx3oEVgIYPI,4687
|
2
|
-
dearpygui_forms-0.1.2.dist-info/METADATA,sha256=8vuGAlFk6-wkpqYomj5N4YS9sZrzQTVUtEMz_k2bB98,305
|
3
|
-
dearpygui_forms-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
4
|
-
dearpygui_forms-0.1.2.dist-info/entry_points.txt,sha256=7Iv9K4ckShx5C5O1M7Ta6zoIN9HUBBa7vHllqm2kvDQ,57
|
5
|
-
dearpygui_forms-0.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|