funcnodes-basic 0.2.1__py3-none-any.whl → 0.2.2__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.
- funcnodes_basic/__init__.py +3 -1
- funcnodes_basic/input.py +84 -0
- {funcnodes_basic-0.2.1.dist-info → funcnodes_basic-0.2.2.dist-info}/METADATA +11 -11
- funcnodes_basic-0.2.2.dist-info/RECORD +13 -0
- {funcnodes_basic-0.2.1.dist-info → funcnodes_basic-0.2.2.dist-info}/WHEEL +2 -1
- funcnodes_basic-0.2.2.dist-info/entry_points.txt +3 -0
- funcnodes_basic-0.2.2.dist-info/top_level.txt +1 -0
- funcnodes_basic-0.2.1.dist-info/RECORD +0 -11
- funcnodes_basic-0.2.1.dist-info/entry_points.txt +0 -4
- {funcnodes_basic-0.2.1.dist-info → funcnodes_basic-0.2.2.dist-info/licenses}/LICENSE +0 -0
funcnodes_basic/__init__.py
CHANGED
@@ -4,13 +4,15 @@ from .math_nodes import NODE_SHELF as math_shelf
|
|
4
4
|
from .lists import NODE_SHELF as lists_shelf
|
5
5
|
from .strings import NODE_SHELF as strings_shelf
|
6
6
|
from .dicts import NODE_SHELF as dicts_shelf
|
7
|
+
from .input import NODE_SHELF as input_shelf
|
7
8
|
|
8
9
|
|
9
|
-
__version__ = "0.2.
|
10
|
+
__version__ = "0.2.2"
|
10
11
|
|
11
12
|
NODE_SHELF = Shelf(
|
12
13
|
nodes=[],
|
13
14
|
subshelves=[
|
15
|
+
input_shelf,
|
14
16
|
lists_shelf,
|
15
17
|
dicts_shelf,
|
16
18
|
strings_shelf,
|
funcnodes_basic/input.py
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
from typing import Union
|
2
|
+
import funcnodes_core as fn
|
3
|
+
|
4
|
+
|
5
|
+
@fn.NodeDecorator(
|
6
|
+
node_id="input.any",
|
7
|
+
node_name="Input",
|
8
|
+
description="Any input",
|
9
|
+
outputs=[
|
10
|
+
{"name": "out"},
|
11
|
+
],
|
12
|
+
)
|
13
|
+
def any_input(input: Union[str, float, int, bool]) -> str:
|
14
|
+
return input
|
15
|
+
|
16
|
+
|
17
|
+
@fn.NodeDecorator(
|
18
|
+
node_id="input.str",
|
19
|
+
node_name="String Input",
|
20
|
+
description="Input a string",
|
21
|
+
outputs=[
|
22
|
+
{"name": "string"},
|
23
|
+
],
|
24
|
+
)
|
25
|
+
def str_input(input: str) -> str:
|
26
|
+
return str(input)
|
27
|
+
|
28
|
+
|
29
|
+
@fn.NodeDecorator(
|
30
|
+
node_id="input.int",
|
31
|
+
node_name="Integer Input",
|
32
|
+
description="Input an integer",
|
33
|
+
outputs=[
|
34
|
+
{"name": "integer"},
|
35
|
+
],
|
36
|
+
)
|
37
|
+
def int_input(input: int) -> int:
|
38
|
+
return int(input)
|
39
|
+
|
40
|
+
|
41
|
+
@fn.NodeDecorator(
|
42
|
+
node_id="input.float",
|
43
|
+
node_name="Float Input",
|
44
|
+
description="Input a float",
|
45
|
+
outputs=[
|
46
|
+
{"name": "float"},
|
47
|
+
],
|
48
|
+
)
|
49
|
+
def float_input(input: float) -> float:
|
50
|
+
return float(input)
|
51
|
+
|
52
|
+
|
53
|
+
@fn.NodeDecorator(
|
54
|
+
node_id="input.bool",
|
55
|
+
node_name="Boolean Input",
|
56
|
+
description="Input a boolean",
|
57
|
+
outputs=[
|
58
|
+
{"name": "boolean"},
|
59
|
+
],
|
60
|
+
)
|
61
|
+
def bool_input(input: bool) -> bool:
|
62
|
+
if isinstance(input, str):
|
63
|
+
if input.lower() in ("true", "1", "yes"):
|
64
|
+
input = True
|
65
|
+
elif input.lower() in ("false", "0", "no"):
|
66
|
+
input = False
|
67
|
+
elif isinstance(input, (int, float)):
|
68
|
+
input = bool(input)
|
69
|
+
else:
|
70
|
+
input = bool(input)
|
71
|
+
return bool(input)
|
72
|
+
|
73
|
+
|
74
|
+
NODE_SHELF = fn.Shelf(
|
75
|
+
nodes=[
|
76
|
+
any_input,
|
77
|
+
str_input,
|
78
|
+
int_input,
|
79
|
+
float_input,
|
80
|
+
bool_input,
|
81
|
+
],
|
82
|
+
name="Input",
|
83
|
+
description="Simple input nodes",
|
84
|
+
)
|
@@ -1,19 +1,20 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: funcnodes-basic
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.2
|
4
4
|
Summary: Basic functionalities for funcnodes
|
5
|
+
Author-email: Julian Kimmig <julian.kimmig@linkdlab.de>
|
5
6
|
License: AGPL-3.0
|
6
|
-
|
7
|
-
Author-email: julian.kimmig@linkdlab.de>
|
8
|
-
Requires-Python: >=3.11
|
9
|
-
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
10
|
-
Requires-Dist: funcnodes
|
11
|
-
Requires-Dist: funcnodes-core (>=0.3.9)
|
12
|
-
Project-URL: Homepage, https://github.com/Linkdlab/funcnodes_basic
|
13
|
-
Project-URL: download, https://pypi.org/project/funcnodes-basic/#files
|
7
|
+
Project-URL: homepage, https://github.com/Linkdlab/funcnodes_basic
|
14
8
|
Project-URL: source, https://github.com/Linkdlab/funcnodes_basic
|
15
9
|
Project-URL: tracker, https://github.com/Linkdlab/funcnodes_basic/issues
|
10
|
+
Project-URL: download, https://pypi.org/project/funcnodes-basic/#files
|
11
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
12
|
+
Requires-Python: >=3.11
|
16
13
|
Description-Content-Type: text/markdown
|
14
|
+
License-File: LICENSE
|
15
|
+
Requires-Dist: funcnodes-core>=0.3.9
|
16
|
+
Requires-Dist: funcnodes
|
17
|
+
Dynamic: license-file
|
17
18
|
|
18
19
|
# FuncNodes Basic
|
19
20
|
|
@@ -48,4 +49,3 @@ This project is licensed under the MIT License.
|
|
48
49
|
## Contact
|
49
50
|
|
50
51
|
For any questions or issues, please open an issue on the GitHub repository.
|
51
|
-
|
@@ -0,0 +1,13 @@
|
|
1
|
+
funcnodes_basic/__init__.py,sha256=-Y8ZnYjuERjcJ1JET2VMwT3l8OVXgO_q16Af-ViZ3YA,583
|
2
|
+
funcnodes_basic/dicts.py,sha256=koNJEwIq9ryC7evBpnI-QmR7MBIbgUWqpPpwhB3M69Y,2507
|
3
|
+
funcnodes_basic/input.py,sha256=FSHS1bIJ2dJc9NqWaJO0MxegRBERhfxFdkmDiwAuE6o,1654
|
4
|
+
funcnodes_basic/lists.py,sha256=9kGnovK-oClFatslbIeYne27l2-EPEXZbr_6yQ1B1cY,5835
|
5
|
+
funcnodes_basic/logic.py,sha256=YwIcAgDqxnmJoLVN_hk9XgqrOJvkx3zczx2DxgBliHU,4304
|
6
|
+
funcnodes_basic/math_nodes.py,sha256=PasNf-1wAvbJ_c-_qeiIDaUVfgPQEREJApeUcTS4FQg,10586
|
7
|
+
funcnodes_basic/strings.py,sha256=O6rcxBQJ5eYd765w_tolaD6xMwsNmtBjiPgJ_69tKyA,16429
|
8
|
+
funcnodes_basic-0.2.2.dist-info/licenses/LICENSE,sha256=21Lj2q2SYKHMY4768_a3pr3q0jY2VYamAHipoodhMDc,34273
|
9
|
+
funcnodes_basic-0.2.2.dist-info/METADATA,sha256=bsn7Tm2o61wEtJ8v4qTFdiEklTu7o0-KjHQJuqaVsiM,2001
|
10
|
+
funcnodes_basic-0.2.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
11
|
+
funcnodes_basic-0.2.2.dist-info/entry_points.txt,sha256=HZ0g1oDO8PrL_f6b09lfTrS-jXqbZrP0qYf1Km_pVxw,79
|
12
|
+
funcnodes_basic-0.2.2.dist-info/top_level.txt,sha256=xYbcX5Jx-Ow3N3kgXtyvh8kuhCahb3eHBIZfMvkpVKI,16
|
13
|
+
funcnodes_basic-0.2.2.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
funcnodes_basic
|
@@ -1,11 +0,0 @@
|
|
1
|
-
funcnodes_basic/__init__.py,sha256=zmYrXkQBz7FVRpwBlCsirF_PlMcCfInJ7vnEeVkFbPA,517
|
2
|
-
funcnodes_basic/dicts.py,sha256=koNJEwIq9ryC7evBpnI-QmR7MBIbgUWqpPpwhB3M69Y,2507
|
3
|
-
funcnodes_basic/lists.py,sha256=9kGnovK-oClFatslbIeYne27l2-EPEXZbr_6yQ1B1cY,5835
|
4
|
-
funcnodes_basic/logic.py,sha256=YwIcAgDqxnmJoLVN_hk9XgqrOJvkx3zczx2DxgBliHU,4304
|
5
|
-
funcnodes_basic/math_nodes.py,sha256=PasNf-1wAvbJ_c-_qeiIDaUVfgPQEREJApeUcTS4FQg,10586
|
6
|
-
funcnodes_basic/strings.py,sha256=O6rcxBQJ5eYd765w_tolaD6xMwsNmtBjiPgJ_69tKyA,16429
|
7
|
-
funcnodes_basic-0.2.1.dist-info/LICENSE,sha256=21Lj2q2SYKHMY4768_a3pr3q0jY2VYamAHipoodhMDc,34273
|
8
|
-
funcnodes_basic-0.2.1.dist-info/METADATA,sha256=yQQi_2DTK5h44zXyRO-d-pNxC_DLS6qRBrfwLOOI5wY,1968
|
9
|
-
funcnodes_basic-0.2.1.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
10
|
-
funcnodes_basic-0.2.1.dist-info/entry_points.txt,sha256=Y7-9Rw_0qbyg8MrdLG6zjiEmUYBug_K4TBdJz9MAKxA,76
|
11
|
-
funcnodes_basic-0.2.1.dist-info/RECORD,,
|
File without changes
|