stinger-ipc 0.0.4__py3-none-any.whl → 0.0.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.
- {stinger_ipc-0.0.4.dist-info → stinger_ipc-0.0.5.dist-info}/METADATA +2 -1
- {stinger_ipc-0.0.4.dist-info → stinger_ipc-0.0.5.dist-info}/RECORD +8 -8
- stinger_ipc-0.0.5.dist-info/entry_points.txt +4 -0
- stingeripc/tools/markdown_generator.py +13 -6
- stingeripc/tools/python_generator.py +20 -10
- stinger_ipc-0.0.4.dist-info/entry_points.txt +0 -4
- {stinger_ipc-0.0.4.dist-info → stinger_ipc-0.0.5.dist-info}/WHEEL +0 -0
- {stinger_ipc-0.0.4.dist-info → stinger_ipc-0.0.5.dist-info}/licenses/LICENSE +0 -0
- {stinger_ipc-0.0.4.dist-info → stinger_ipc-0.0.5.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: stinger-ipc
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
4
4
|
Summary: Tools to create code to do IPC over MQTT
|
5
5
|
Requires-Python: >=3.12
|
6
6
|
Description-Content-Type: text/markdown
|
@@ -11,6 +11,7 @@ Requires-Dist: pydantic>=2.11.7
|
|
11
11
|
Requires-Dist: pyyaml>=6.0.2
|
12
12
|
Requires-Dist: ruamel-yaml>=0.18.14
|
13
13
|
Requires-Dist: stringcase>=1.2.0
|
14
|
+
Requires-Dist: typer>=0.16.1
|
14
15
|
Requires-Dist: yamlloader>=1.5.1
|
15
16
|
Dynamic: license-file
|
16
17
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
stinger_ipc-0.0.
|
1
|
+
stinger_ipc-0.0.5.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
2
2
|
stingeripc/__init__.py,sha256=PTr5WfMfB-GL4vp3-XMU8IwGv3Q5RXQ24H7JuEo3hdk,133
|
3
3
|
stingeripc/args.py,sha256=x3P8GRu9-jyiMl62t0FPqbWY18FbhMVN4eSa2UzUv6c,3960
|
4
4
|
stingeripc/asyncapi.py,sha256=DJZuz_LiQEJjQGlnfRtgOToWVD55uLw5ZoiZ95-bxZc,23291
|
@@ -43,11 +43,11 @@ stingeripc/templates/rust/server/Cargo.toml.jinja2,sha256=eyMM4xmZP-9mlDJMQ5zrFR
|
|
43
43
|
stingeripc/templates/rust/server/examples/server.rs.jinja2,sha256=6XrMXUrcr9c0_m5u02kQzM88UHngVcUQCqL5uChefS8,3682
|
44
44
|
stingeripc/templates/rust/server/src/lib.rs.jinja2,sha256=CFIrHI9LkZ2P1vX-YOOa0TwVVzqnVo59RnDAIXYV5Iw,13580
|
45
45
|
stingeripc/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
-
stingeripc/tools/markdown_generator.py,sha256=
|
47
|
-
stingeripc/tools/python_generator.py,sha256=
|
46
|
+
stingeripc/tools/markdown_generator.py,sha256=y3V3dJHLJyi1xNNMsqFsB_4f2hUBeOWmOCYCY0gpNY8,1051
|
47
|
+
stingeripc/tools/python_generator.py,sha256=Pva8lXT0ITfhPjCmIPlEAhBMfvENTAK93aD1XdwJuFE,1824
|
48
48
|
stingeripc/tools/rust_generator.py,sha256=cjl7kbTT92FXpZlZdlq_R3F7lPxcMMOxGQjP9wH1nvo,1824
|
49
|
-
stinger_ipc-0.0.
|
50
|
-
stinger_ipc-0.0.
|
51
|
-
stinger_ipc-0.0.
|
52
|
-
stinger_ipc-0.0.
|
53
|
-
stinger_ipc-0.0.
|
49
|
+
stinger_ipc-0.0.5.dist-info/METADATA,sha256=tq7xkL6WhKdIF9Vt1f69hVZqXoxx3zmC5bZB9lYZ9hQ,6037
|
50
|
+
stinger_ipc-0.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
51
|
+
stinger_ipc-0.0.5.dist-info/entry_points.txt,sha256=9JJsg3jryyCfF2YqKq26BSQg6jh4xl6Nm43CMl7PnoM,169
|
52
|
+
stinger_ipc-0.0.5.dist-info/top_level.txt,sha256=mSNwAf83_1qiTP_vu7XEPBrZu-fDusT1FFyQZzCrRcU,11
|
53
|
+
stinger_ipc-0.0.5.dist-info/RECORD,,
|
@@ -1,12 +1,15 @@
|
|
1
1
|
import os
|
2
2
|
import sys
|
3
3
|
from jacobsjinjatoo import templator as jj2
|
4
|
-
|
4
|
+
import os.path
|
5
|
+
import typer
|
6
|
+
from typing_extensions import Annotated
|
5
7
|
from stingeripc import StingerInterface
|
8
|
+
from rich import print
|
9
|
+
from pathlib import Path
|
6
10
|
|
7
|
-
def main():
|
8
|
-
|
9
|
-
outdir = sys.argv[2]
|
11
|
+
def main(inname: Annotated[Path, typer.Argument(exists=True, file_okay=True, dir_okay=False, readable=True)], outdir: Annotated[Path, typer.Argument(file_okay=False, dir_okay=True, writable=True, readable=True)]):
|
12
|
+
print(f"[bold green]Reading:[/bold green] {inname}")
|
10
13
|
with open(inname, "r") as f:
|
11
14
|
stinger = StingerInterface.from_yaml(f)
|
12
15
|
params = {
|
@@ -19,7 +22,11 @@ def main():
|
|
19
22
|
for output_file in [
|
20
23
|
"index.md",
|
21
24
|
]:
|
25
|
+
print(f"[bold red]GENERATING:[/bold red] {output_file}")
|
22
26
|
t.render_template(f"{output_file}.jinja2", output_file, **params)
|
23
27
|
|
24
|
-
|
25
|
-
main
|
28
|
+
def run():
|
29
|
+
typer.run(main)
|
30
|
+
|
31
|
+
if __name__ == "__main__":
|
32
|
+
run()
|
@@ -2,12 +2,15 @@ from jacobsjinjatoo import templator as jj2
|
|
2
2
|
from jacobsjinjatoo import stringmanip
|
3
3
|
import sys
|
4
4
|
import os.path
|
5
|
-
|
5
|
+
import typer
|
6
|
+
from typing_extensions import Annotated
|
6
7
|
from stingeripc import StingerInterface
|
8
|
+
from rich import print
|
9
|
+
from pathlib import Path
|
10
|
+
|
11
|
+
def main(inname: Annotated[Path, typer.Argument(exists=True, file_okay=True, dir_okay=False, readable=True)], outdir: Annotated[Path, typer.Argument(file_okay=False, dir_okay=True, writable=True, readable=True)]):
|
7
12
|
|
8
|
-
|
9
|
-
inname = sys.argv[1]
|
10
|
-
outdir = sys.argv[2]
|
13
|
+
print(f"[bold green]Reading:[/bold green] {inname}")
|
11
14
|
with open(inname, "r") as f:
|
12
15
|
stinger = StingerInterface.from_yaml(f)
|
13
16
|
params = {
|
@@ -20,10 +23,13 @@ def main():
|
|
20
23
|
for output_file in [
|
21
24
|
"pyproject.toml",
|
22
25
|
]:
|
23
|
-
|
26
|
+
print(f"[bold red]Generating:[/bold red] {output_file}")
|
27
|
+
t.render_template(f"{output_file}.jinja2", os.path.join(outdir, output_file), **params)
|
24
28
|
|
25
|
-
|
26
|
-
os.
|
29
|
+
package_name = f"{stringmanip.lower_camel_case(stinger.name).lower()}ipc"
|
30
|
+
generated_pkg_dir = os.path.join(outdir, package_name)
|
31
|
+
print(f"[bold red]Making Directory:[/bold red] {generated_pkg_dir}")
|
32
|
+
os.makedirs(generated_pkg_dir, exist_ok=True)
|
27
33
|
for output_file in [
|
28
34
|
"server.py",
|
29
35
|
"client.py",
|
@@ -31,9 +37,13 @@ def main():
|
|
31
37
|
"__init__.py",
|
32
38
|
"method_codes.py",
|
33
39
|
]:
|
34
|
-
|
40
|
+
print(f"[bold red]Generating:[/bold red] {output_file}")
|
41
|
+
t.render_template(f"{output_file}.jinja2", os.path.join(generated_pkg_dir, output_file), **params)
|
42
|
+
|
43
|
+
t.render_template("interface_types.py.jinja2", os.path.join(generated_pkg_dir, f"{stinger.get_enum_module_name()}.py"), **params)
|
35
44
|
|
36
|
-
|
45
|
+
def run():
|
46
|
+
typer.run(main)
|
37
47
|
|
38
48
|
if __name__ == "__main__":
|
39
|
-
|
49
|
+
run()
|
File without changes
|
File without changes
|
File without changes
|