VertexEngine-CLI 1.0__tar.gz

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.
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: VertexEngine-CLI
3
+ Version: 1.0
4
+ Summary: An Offical CLI library for VertexEngine.
5
+ Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
6
+ License: MIT
7
+ Project-URL: Documentation, https://vertexenginedocs.netlify.app/
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: pygame>=2.0
11
+ Requires-Dist: PyQt6>=6.7
12
+ Requires-Dist: pyinstaller>=6.5.0
13
+ Requires-Dist: VertexEngine>=1.0.1
14
+
15
+ # VertexEngine/Vertex
16
+ VertexEngine is a GUI and Game Engine for python applications, it works best if you use py installer
17
+
18
+ ## Change Logs (1.0rc1 - 1.1rc4), NEW!
19
+ ### 1.1rc4
20
+ - FINAL RC!
21
+ - Added 2 New Libraries:
22
+ ~ VertexEngine.WebEngine
23
+ ~ VertexEngine.WebView
24
+ ### 1.1rc3
25
+ - Revamped Input System!
26
+ - DEMO GAMES!
27
+ - Updated Scene Docs
28
+ ### Version 1.1rc2
29
+ - Documentation Expansion!
30
+ ~ Fixed the Changelogs
31
+ - New Input System!
32
+ - Old System (Qt) depreceated and not recomended for use.
33
+ ### Version 1.1rc1
34
+ - New Library! (And Modules)!:
35
+ ~ InputSystem
36
+ ~ Buttons (Mouse and Widget)
37
+ ~ Keyboard Input
38
+ ### Version 1.0.1
39
+ - Added Changelogs!
40
+ ### Version 1.0
41
+ - Added 2 New Libraries:
42
+ ~ VertexEngine.SimpleGUI
43
+ ~ VertexEngine.VertexScreenModifiers
44
+ ### Version 1.0rc2
45
+ - Final Release Candidate
46
+ - Added 1 New Library!:
47
+ ~ VertexUI
48
+
49
+ ### Version 1.0rc1
50
+ - Size Compression
51
+ - Added 1 New Library!:
52
+ ~ VertexScreen
53
+
54
+ ## How to install Pyinstaller
55
+ Step 1. Type in:
56
+ pip install pyinstaller
57
+
58
+ Step 2. Wait a few min, don't worry if it takes 1 hr or more, it will finish
59
+
60
+ Step 3. How to use pyinstaller
61
+ type:
62
+ python -m PyInstaller --onefile *.py
63
+
64
+ There are flags:
65
+ --noconsole > disables the console when you run the app
66
+ --onefile > compress all of the code into one file
67
+ --icon > the *.ico file after you type it will be set as the app icon.
68
+
69
+ ## How to install VertexEngine/Vertex:
70
+
71
+ Step 1:
72
+ Type in
73
+ pip install VertexEngine
74
+
75
+ Step 2: Wait a few min, don't worry if it takes 1 hr or more, it will finish
76
+
77
+ Step 3: Where to start?
78
+ Read the documentations. Also copy the following template:
79
+ -------------------------------------------------------
80
+ from VertexEngine.engine import GameEngine
81
+ from VertexEngine import VertexScreen
82
+ from VertexEngine.audio import AudioManager
83
+ from VertexEngine.scenes import Scene
84
+ import pygame
85
+ import sys
86
+ from PyQt6.QtGui import QIcon
87
+ from PyQt6.QtWidgets import QApplication
88
+
89
+ class Main(Scene):
90
+ def __init__(self, engine):
91
+ super().__init__(engine)
92
+ self.width = engine.width
93
+ self.height = engine.height
94
+
95
+ def update(self):
96
+ pass
97
+
98
+ def draw(self, surface):
99
+ VertexScreen.Draw.rect(VertexScreen.Draw, surface, (0, 255, 0), (-570, 350, 5000, 500))
100
+
101
+ if __name__ == '__main__':
102
+ app = QApplication(sys.argv) # <- create app
103
+ engine = GameEngine(fps=60, width=1920, height=1080, title="Screen.com/totally-not-virus") # <- initialize a1080p window at 60 FPS
104
+
105
+ engine.setWindowTitle('Screen.com/totally-not-virus') # <- name the app
106
+ engine.setWindowIcon(QIcon('snake.ico')) # <- icon
107
+ engine.show() # <- show window
108
+
109
+ main_scene = Main(engine) # <- intialize the scene
110
+ engine.scene_manager.add_scene('main', main_scene) # <- name scene
111
+ engine.scene_manager.switch_to('main') # <- switch to the main scene pls
112
+
113
+ app.exec()
114
+
115
+ The following template creates a window with a green rectangle (the ground.)
116
+
117
+ Pygame or PyQt6 systems are compatible with Vertex so you can use pygame collision system or PyQt6's UI system in VertexEngine.
118
+
119
+ ## Help
120
+ The documentation is in the following link:
121
+ [Project Documentation](https://vertexenginedocs.netlify.app/) for help.
122
+
123
+ ## Dependencies
124
+ Vertex obviously has heavy dependencies since it's a game engine, the following requirements are:
125
+
126
+ | Dependency | Version |
127
+ |------------------|--------------------------------------|
128
+ | PyQt6 | >=6.7 |
129
+ | Pygame | >=2.0 |
130
+ | Python | >=3.10 |
131
+
132
+ ## About Me ❔
133
+ I Am a solo developer in Diliman, Quezon City that makes things for fun :)
134
+ 77 Rd 1, 53 Rd 3 Bg-Asa QC
135
+ Email:
136
+ FinalFacility0828@gmail.com
137
+ ## 📄 License
138
+ VertexEngine/Vertex is Managed by the MIT License. This license allows others to tweak the code. However, I would like my name be in the credits if you choose this as your starting ground for your next library.
@@ -0,0 +1,124 @@
1
+ # VertexEngine/Vertex
2
+ VertexEngine is a GUI and Game Engine for python applications, it works best if you use py installer
3
+
4
+ ## Change Logs (1.0rc1 - 1.1rc4), NEW!
5
+ ### 1.1rc4
6
+ - FINAL RC!
7
+ - Added 2 New Libraries:
8
+ ~ VertexEngine.WebEngine
9
+ ~ VertexEngine.WebView
10
+ ### 1.1rc3
11
+ - Revamped Input System!
12
+ - DEMO GAMES!
13
+ - Updated Scene Docs
14
+ ### Version 1.1rc2
15
+ - Documentation Expansion!
16
+ ~ Fixed the Changelogs
17
+ - New Input System!
18
+ - Old System (Qt) depreceated and not recomended for use.
19
+ ### Version 1.1rc1
20
+ - New Library! (And Modules)!:
21
+ ~ InputSystem
22
+ ~ Buttons (Mouse and Widget)
23
+ ~ Keyboard Input
24
+ ### Version 1.0.1
25
+ - Added Changelogs!
26
+ ### Version 1.0
27
+ - Added 2 New Libraries:
28
+ ~ VertexEngine.SimpleGUI
29
+ ~ VertexEngine.VertexScreenModifiers
30
+ ### Version 1.0rc2
31
+ - Final Release Candidate
32
+ - Added 1 New Library!:
33
+ ~ VertexUI
34
+
35
+ ### Version 1.0rc1
36
+ - Size Compression
37
+ - Added 1 New Library!:
38
+ ~ VertexScreen
39
+
40
+ ## How to install Pyinstaller
41
+ Step 1. Type in:
42
+ pip install pyinstaller
43
+
44
+ Step 2. Wait a few min, don't worry if it takes 1 hr or more, it will finish
45
+
46
+ Step 3. How to use pyinstaller
47
+ type:
48
+ python -m PyInstaller --onefile *.py
49
+
50
+ There are flags:
51
+ --noconsole > disables the console when you run the app
52
+ --onefile > compress all of the code into one file
53
+ --icon > the *.ico file after you type it will be set as the app icon.
54
+
55
+ ## How to install VertexEngine/Vertex:
56
+
57
+ Step 1:
58
+ Type in
59
+ pip install VertexEngine
60
+
61
+ Step 2: Wait a few min, don't worry if it takes 1 hr or more, it will finish
62
+
63
+ Step 3: Where to start?
64
+ Read the documentations. Also copy the following template:
65
+ -------------------------------------------------------
66
+ from VertexEngine.engine import GameEngine
67
+ from VertexEngine import VertexScreen
68
+ from VertexEngine.audio import AudioManager
69
+ from VertexEngine.scenes import Scene
70
+ import pygame
71
+ import sys
72
+ from PyQt6.QtGui import QIcon
73
+ from PyQt6.QtWidgets import QApplication
74
+
75
+ class Main(Scene):
76
+ def __init__(self, engine):
77
+ super().__init__(engine)
78
+ self.width = engine.width
79
+ self.height = engine.height
80
+
81
+ def update(self):
82
+ pass
83
+
84
+ def draw(self, surface):
85
+ VertexScreen.Draw.rect(VertexScreen.Draw, surface, (0, 255, 0), (-570, 350, 5000, 500))
86
+
87
+ if __name__ == '__main__':
88
+ app = QApplication(sys.argv) # <- create app
89
+ engine = GameEngine(fps=60, width=1920, height=1080, title="Screen.com/totally-not-virus") # <- initialize a1080p window at 60 FPS
90
+
91
+ engine.setWindowTitle('Screen.com/totally-not-virus') # <- name the app
92
+ engine.setWindowIcon(QIcon('snake.ico')) # <- icon
93
+ engine.show() # <- show window
94
+
95
+ main_scene = Main(engine) # <- intialize the scene
96
+ engine.scene_manager.add_scene('main', main_scene) # <- name scene
97
+ engine.scene_manager.switch_to('main') # <- switch to the main scene pls
98
+
99
+ app.exec()
100
+
101
+ The following template creates a window with a green rectangle (the ground.)
102
+
103
+ Pygame or PyQt6 systems are compatible with Vertex so you can use pygame collision system or PyQt6's UI system in VertexEngine.
104
+
105
+ ## Help
106
+ The documentation is in the following link:
107
+ [Project Documentation](https://vertexenginedocs.netlify.app/) for help.
108
+
109
+ ## Dependencies
110
+ Vertex obviously has heavy dependencies since it's a game engine, the following requirements are:
111
+
112
+ | Dependency | Version |
113
+ |------------------|--------------------------------------|
114
+ | PyQt6 | >=6.7 |
115
+ | Pygame | >=2.0 |
116
+ | Python | >=3.10 |
117
+
118
+ ## About Me ❔
119
+ I Am a solo developer in Diliman, Quezon City that makes things for fun :)
120
+ 77 Rd 1, 53 Rd 3 Bg-Asa QC
121
+ Email:
122
+ FinalFacility0828@gmail.com
123
+ ## 📄 License
124
+ VertexEngine/Vertex is Managed by the MIT License. This license allows others to tweak the code. However, I would like my name be in the credits if you choose this as your starting ground for your next library.
@@ -0,0 +1,27 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "VertexEngine-CLI"
7
+ version = "1.0"
8
+ description = "An Offical CLI library for VertexEngine."
9
+ authors = [
10
+ { name = "Tyrel Miguel", email = "annbasilan0828@gmail.com" }
11
+ ]
12
+ readme = "README.md"
13
+ license = { text = "MIT" }
14
+ requires-python = ">=3.10"
15
+
16
+ dependencies = [
17
+ "pygame>=2.0",
18
+ "PyQt6>=6.7",
19
+ "pyinstaller>=6.5.0",
20
+ "VertexEngine>=1.0.1"
21
+ ]
22
+
23
+ [project.urls]
24
+ Documentation = "https://vertexenginedocs.netlify.app/"
25
+
26
+ [tool.setuptools.packages.find]
27
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: VertexEngine-CLI
3
+ Version: 1.0
4
+ Summary: An Offical CLI library for VertexEngine.
5
+ Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
6
+ License: MIT
7
+ Project-URL: Documentation, https://vertexenginedocs.netlify.app/
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: pygame>=2.0
11
+ Requires-Dist: PyQt6>=6.7
12
+ Requires-Dist: pyinstaller>=6.5.0
13
+ Requires-Dist: VertexEngine>=1.0.1
14
+
15
+ # VertexEngine/Vertex
16
+ VertexEngine is a GUI and Game Engine for python applications, it works best if you use py installer
17
+
18
+ ## Change Logs (1.0rc1 - 1.1rc4), NEW!
19
+ ### 1.1rc4
20
+ - FINAL RC!
21
+ - Added 2 New Libraries:
22
+ ~ VertexEngine.WebEngine
23
+ ~ VertexEngine.WebView
24
+ ### 1.1rc3
25
+ - Revamped Input System!
26
+ - DEMO GAMES!
27
+ - Updated Scene Docs
28
+ ### Version 1.1rc2
29
+ - Documentation Expansion!
30
+ ~ Fixed the Changelogs
31
+ - New Input System!
32
+ - Old System (Qt) depreceated and not recomended for use.
33
+ ### Version 1.1rc1
34
+ - New Library! (And Modules)!:
35
+ ~ InputSystem
36
+ ~ Buttons (Mouse and Widget)
37
+ ~ Keyboard Input
38
+ ### Version 1.0.1
39
+ - Added Changelogs!
40
+ ### Version 1.0
41
+ - Added 2 New Libraries:
42
+ ~ VertexEngine.SimpleGUI
43
+ ~ VertexEngine.VertexScreenModifiers
44
+ ### Version 1.0rc2
45
+ - Final Release Candidate
46
+ - Added 1 New Library!:
47
+ ~ VertexUI
48
+
49
+ ### Version 1.0rc1
50
+ - Size Compression
51
+ - Added 1 New Library!:
52
+ ~ VertexScreen
53
+
54
+ ## How to install Pyinstaller
55
+ Step 1. Type in:
56
+ pip install pyinstaller
57
+
58
+ Step 2. Wait a few min, don't worry if it takes 1 hr or more, it will finish
59
+
60
+ Step 3. How to use pyinstaller
61
+ type:
62
+ python -m PyInstaller --onefile *.py
63
+
64
+ There are flags:
65
+ --noconsole > disables the console when you run the app
66
+ --onefile > compress all of the code into one file
67
+ --icon > the *.ico file after you type it will be set as the app icon.
68
+
69
+ ## How to install VertexEngine/Vertex:
70
+
71
+ Step 1:
72
+ Type in
73
+ pip install VertexEngine
74
+
75
+ Step 2: Wait a few min, don't worry if it takes 1 hr or more, it will finish
76
+
77
+ Step 3: Where to start?
78
+ Read the documentations. Also copy the following template:
79
+ -------------------------------------------------------
80
+ from VertexEngine.engine import GameEngine
81
+ from VertexEngine import VertexScreen
82
+ from VertexEngine.audio import AudioManager
83
+ from VertexEngine.scenes import Scene
84
+ import pygame
85
+ import sys
86
+ from PyQt6.QtGui import QIcon
87
+ from PyQt6.QtWidgets import QApplication
88
+
89
+ class Main(Scene):
90
+ def __init__(self, engine):
91
+ super().__init__(engine)
92
+ self.width = engine.width
93
+ self.height = engine.height
94
+
95
+ def update(self):
96
+ pass
97
+
98
+ def draw(self, surface):
99
+ VertexScreen.Draw.rect(VertexScreen.Draw, surface, (0, 255, 0), (-570, 350, 5000, 500))
100
+
101
+ if __name__ == '__main__':
102
+ app = QApplication(sys.argv) # <- create app
103
+ engine = GameEngine(fps=60, width=1920, height=1080, title="Screen.com/totally-not-virus") # <- initialize a1080p window at 60 FPS
104
+
105
+ engine.setWindowTitle('Screen.com/totally-not-virus') # <- name the app
106
+ engine.setWindowIcon(QIcon('snake.ico')) # <- icon
107
+ engine.show() # <- show window
108
+
109
+ main_scene = Main(engine) # <- intialize the scene
110
+ engine.scene_manager.add_scene('main', main_scene) # <- name scene
111
+ engine.scene_manager.switch_to('main') # <- switch to the main scene pls
112
+
113
+ app.exec()
114
+
115
+ The following template creates a window with a green rectangle (the ground.)
116
+
117
+ Pygame or PyQt6 systems are compatible with Vertex so you can use pygame collision system or PyQt6's UI system in VertexEngine.
118
+
119
+ ## Help
120
+ The documentation is in the following link:
121
+ [Project Documentation](https://vertexenginedocs.netlify.app/) for help.
122
+
123
+ ## Dependencies
124
+ Vertex obviously has heavy dependencies since it's a game engine, the following requirements are:
125
+
126
+ | Dependency | Version |
127
+ |------------------|--------------------------------------|
128
+ | PyQt6 | >=6.7 |
129
+ | Pygame | >=2.0 |
130
+ | Python | >=3.10 |
131
+
132
+ ## About Me ❔
133
+ I Am a solo developer in Diliman, Quezon City that makes things for fun :)
134
+ 77 Rd 1, 53 Rd 3 Bg-Asa QC
135
+ Email:
136
+ FinalFacility0828@gmail.com
137
+ ## 📄 License
138
+ VertexEngine/Vertex is Managed by the MIT License. This license allows others to tweak the code. However, I would like my name be in the credits if you choose this as your starting ground for your next library.
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/VertexEngine_CLI.egg-info/PKG-INFO
4
+ src/VertexEngine_CLI.egg-info/SOURCES.txt
5
+ src/VertexEngine_CLI.egg-info/dependency_links.txt
6
+ src/VertexEngine_CLI.egg-info/requires.txt
7
+ src/VertexEngine_CLI.egg-info/top_level.txt
8
+ src/vertex/__init__.py
9
+ src/vertex/__main__.py
10
+ src/vertex/minicli.py
11
+ src/vertex/templates.py
@@ -0,0 +1,4 @@
1
+ pygame>=2.0
2
+ PyQt6>=6.7
3
+ pyinstaller>=6.5.0
4
+ VertexEngine>=1.0.1
File without changes
@@ -0,0 +1,68 @@
1
+ # __main__.py
2
+ from pathlib import Path
3
+ import os
4
+
5
+ from PyInstaller.__main__ import run as pyinstaller_run
6
+
7
+ from .minicli import CLI
8
+ from .templates import TEMPLATES
9
+
10
+
11
+ def main():
12
+ cli = CLI()
13
+
14
+ # ------------------
15
+ # build command
16
+ # ------------------
17
+ @cli.command("build")
18
+ def build_executable(
19
+ script_path: str,
20
+ onefile: bool = False,
21
+ windowed: bool = False,
22
+ ):
23
+ """
24
+ Build an executable from a Python script using PyInstaller.
25
+ """
26
+ if not os.path.isfile(script_path):
27
+ raise FileNotFoundError(f"Script not found: {script_path}")
28
+
29
+ args = ["--clean"]
30
+
31
+ if onefile:
32
+ args.append("--onefile")
33
+ if windowed:
34
+ args.append("--windowed")
35
+
36
+ args.append(script_path)
37
+
38
+ print(f"Running PyInstaller with args: {args}")
39
+ pyinstaller_run(args)
40
+
41
+ # ------------------
42
+ # init command
43
+ # ------------------
44
+ @cli.command("init")
45
+ def init(kind: str = "game"):
46
+ """Initialize a project template"""
47
+ if kind not in TEMPLATES:
48
+ print("Available templates:", ", ".join(TEMPLATES))
49
+ return
50
+
51
+ for rel_path, content in TEMPLATES[kind].items():
52
+ path = Path.cwd() / rel_path
53
+ path.parent.mkdir(parents=True, exist_ok=True)
54
+
55
+ if path.exists():
56
+ print(f"Skipped existing file: {rel_path}")
57
+ continue
58
+
59
+ path.write_text(content, encoding="utf-8")
60
+ print(f"Created {rel_path}")
61
+
62
+ print(f"Template '{kind}' initialized ✔")
63
+
64
+ cli.run()
65
+
66
+
67
+ if __name__ == "__main__":
68
+ main()
@@ -0,0 +1,58 @@
1
+ # cli.py
2
+ import sys
3
+ import inspect
4
+ from typing import Callable, Dict
5
+
6
+
7
+ class Command:
8
+ def __init__(self, func: Callable, name: str):
9
+ self.func = func
10
+ self.name = name
11
+ self.help = func.__doc__ or ""
12
+ self.signature = inspect.signature(func)
13
+
14
+ def run(self, argv: list[str]):
15
+ params = list(self.signature.parameters.values())
16
+ args = []
17
+
18
+ for i, param in enumerate(params):
19
+ if i < len(argv):
20
+ args.append(argv[i])
21
+ elif param.default is not inspect.Parameter.empty:
22
+ args.append(param.default)
23
+ else:
24
+ raise SystemExit(f"Missing argument: {param.name}")
25
+
26
+ self.func(*args)
27
+
28
+
29
+ class CLI:
30
+ def __init__(self):
31
+ self.commands: Dict[str, Command] = {}
32
+
33
+ def command(self, name: str | None = None):
34
+ def decorator(func: Callable):
35
+ cmd_name = name or func.__name__
36
+ self.commands[cmd_name] = Command(func, cmd_name)
37
+ return func
38
+ return decorator
39
+
40
+ def run(self, argv=None):
41
+ argv = argv or sys.argv[1:]
42
+
43
+ if not argv or argv[0] in {"-h", "--help"}:
44
+ self.help()
45
+ return
46
+
47
+ cmd, *args = argv
48
+ if cmd not in self.commands:
49
+ print(f"Unknown command: {cmd}\n")
50
+ self.help()
51
+ return
52
+
53
+ self.commands[cmd].run(args)
54
+
55
+ def help(self):
56
+ print("Available commands:\n")
57
+ for name, cmd in self.commands.items():
58
+ print(f" {name:<12} {cmd.help}")
@@ -0,0 +1,49 @@
1
+ # templates.py
2
+ from textwrap import dedent
3
+
4
+ TEMPLATES: dict[str, dict[str, str]] = {
5
+ "game": {
6
+ "main.py": dedent(
7
+ """\
8
+ from VertexEngine.engine import GameEngine
9
+ from VertexEngine import VertexScreen
10
+ from VertexEngine.scenes import Scene
11
+ import sys
12
+ from PyQt6.QtGui import QIcon
13
+ from PyQt6.QtWidgets import QApplication
14
+
15
+
16
+ class Main(Scene):
17
+ def __init__(self, engine):
18
+ super().__init__(engine)
19
+ self.width = engine.width
20
+ self.height = engine.height
21
+
22
+ def update(self):
23
+ pass
24
+
25
+ def draw(self, surface):
26
+ VertexScreen.Draw.rect(
27
+ VertexScreen.Draw,
28
+ surface,
29
+ (0, 255, 0),
30
+ (-570, 350, 5000, 500),
31
+ )
32
+
33
+
34
+ if __name__ == "__main__":
35
+ app = QApplication(sys.argv)
36
+ engine = GameEngine(fps=60, width=1920, height=1080)
37
+ engine.setWindowTitle("Template")
38
+ engine.show()
39
+
40
+ main_scene = Main(engine)
41
+ engine.scene_manager.set_scene(main_scene)
42
+
43
+ app.exec()
44
+ """
45
+ ),
46
+ "README.md": "# VertexEngine Game\n\nGenerated with MiniCLI ✨\n",
47
+ ".gitignore": "__pycache__/\n.env\n",
48
+ },
49
+ }